Compare commits

...
17 Commits
Author SHA1 Message Date
marc d9c6e6ce80 fuck update 2023-01-15 19:20:23 +01:00
marc 89c618e7bc useless 2023-01-15 19:20:02 +01:00
marc 09882ef75d os.environ in cog is more flexible 2023-01-15 19:10:34 +01:00
marc c354ca6362 env var 2023-01-15 18:08:25 +01:00
marc 0306f11305 funding 2022-12-20 17:02:27 +01:00
marc 3668ea7d98 fix 2022-06-01 21:10:06 +02:00
marc 534050a991 update 2022-05-23 01:25:32 +02:00
marc 2893f516dc latest 2022-05-22 00:04:41 +02:00
marc be20e90f08 colorama 2022-05-22 00:03:50 +02:00
marc 7ce95509df update 2022-05-21 23:54:09 +02:00
marc 9feb5b9a3c pipenv update 2022-05-21 23:49:50 +02:00
marc 1f994a6e7f update 2022-05-21 23:49:24 +02:00
marc 0698d093a6 no mute if single 2022-05-21 23:45:15 +02:00
marc e890a561ed update 2022-05-21 23:43:47 +02:00
marc 03c4de805c 13 2022-05-21 23:40:27 +02:00
marc b738111b5e update 2022-05-21 23:40:15 +02:00
marc 03e3e6f692 update 2022-04-02 17:43:29 +02:00
10 changed files with 632 additions and 591 deletions
+6
View File
@@ -1 +1,7 @@
liberapay: marcpartensky
patreon: marcpartensky
github: marcpartensky
custom:
# - monero:43J2XmRtjDPRLD35UsYGH2AZamFBQz7dt4VdvZXVm3SuadTrvcoXUXBRUNHqukFte23Q5TWXqhbwaLJJgoVQzzbe2AJDANQ
- https://paypal.me/marcpartensky
- https://buymeacoffee.com/marcpartensky
+6
View File
@@ -38,6 +38,12 @@ jobs:
with:
push: true
tags: marcpartensky/discord-bot:v${{ github.run_number }}.${{ steps.tag.outputs.tag }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: marcpartensky/discord-bot:latest
test-python-versions:
runs-on: ${{ matrix.os }}
+2 -2
View File
@@ -1,13 +1,13 @@
start:
pipenv run python .
update:
pipenv lock --pre --clear
pipenv update
pipenv lock -r > requirements.txt
dev:
docker-compose -f docker-compose.yml up -d --build --force-recreate --remove-orphans dev
prod:
docker-compose -f docker-compose.yml up -d --build --force-recreate --remove-orphans prod
build: update
build:
docker-compose -f docker-compose.yml build prod
push: build
docker-compose -f docker-compose.yml push prod
+2 -1
View File
@@ -36,6 +36,7 @@ unidecode = '*'
future = '*'
selenium = "*"
fake-useragent = "*"
colorama = "*"
[dev-packages]
black = "*"
@@ -43,4 +44,4 @@ pylint = "*"
jedi = "*"
[requires]
python_version = "3.8.12"
python_version = "3.8.13"
Generated
+578 -549
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -8,7 +8,7 @@ import requests
import discord
from discord.ext import commands, tasks
from config.config import ialab_bot_url, cluster
from config.config import cluster
from rich import print
@@ -18,7 +18,7 @@ class IALab(commands.Cog):
def __init__(self, bot: commands.Bot, **kwargs):
"""Initialize the ialab cog."""
super().__init__(**kwargs)
self.url = ialab_bot_url
self.url = os.environ["IALAB_URL"]
self.bot = bot
@commands.command()
-1
View File
@@ -7,7 +7,6 @@ import requests
import discord
from discord.ext import commands, tasks
from config.config import ialab_bot_url, cluster
from rich import print
+3 -3
View File
@@ -69,7 +69,7 @@ class VoiceChannel(commands.Cog):
logging.info(before)
channel: discord.VoiceChannel = before.channel
members: List[discord.Member] = channel.members
await self.mute_if_single(members)
# await self.mute_if_single(members)
await self.leave_if_alone(members, before.channel)
async def join(
@@ -83,7 +83,7 @@ class VoiceChannel(commands.Cog):
logging.info(after)
channel: discord.VoiceChannel = after.channel
members: List[discord.Member] = channel.members
await self.mute_if_single(members)
# await self.mute_if_single(members)
await self.notify_on_join(member)
await self.join_if_single(members)
@@ -102,7 +102,7 @@ class VoiceChannel(commands.Cog):
before_members: List[discord.Member] = before_channel.members
after_channel: discord.VoiceChannel = after.channel
after_members: List[discord.Member] = after_channel.members
await self.mute_if_single(before_members)
# await self.mute_if_single(before_members)
await self.join_if_single(after_members)
async def mute_if_single(self, members: List[discord.Member]):
-1
View File
@@ -15,7 +15,6 @@ link = "https://discordapp.com/oauth2/authorize?&client_id=703347349623144549&sc
prefix = os.environ.get("DISCORD_PREFIX") or "."
masters = [478552571510915072] # , 219949869220102147]
wolfram = wolframalpha.Client(wolfram_alpha_id)
ialab_bot_url = "https://ialab.marcpartensky.com"
roles = ["@Maître", "@Admin"]
+33 -32
View File
@@ -6,80 +6,81 @@
#
-i https://pypi.org/simple
aenum==2.2.6
aiohttp==3.7.4.post0; python_version >= '3.6'
async-generator==1.10; python_version >= '3.5'
async-timeout==3.0.1; python_full_version >= '3.5.3'
attrs==21.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
beautifulsoup4==4.10.0
certifi==2021.10.8
beautifulsoup4==4.11.1
certifi==2022.5.18.1; python_version >= '3.6'
cffi==1.15.0
chardet==4.0.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
charset-normalizer==2.0.10; python_version >= '3'
charset-normalizer==2.0.12; python_version >= '3'
click==7.1.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
colorama==0.4.4; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
colorama==0.4.4
commonmark==0.9.1
cryptography==36.0.1
cryptography==37.0.2
deprecated==1.2.13; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
discord.py[voice]==1.7.3; python_full_version >= '3.5.3'
dnspython==2.2.0
dnspython==2.2.1
dpy-http-server==0.1.0
fake-useragent==0.1.11
fbchat==2.0.0a5
fbchat==1.9.7
future==0.18.2
gtts==2.2.3
gtts==2.2.4
h11==0.13.0; python_version >= '3.6'
html2text==2020.1.16
idna==3.3; python_version >= '3'
jaraco.context==4.1.1; python_version >= '3.6'
joblib==1.1.0; python_version >= '3.6'
libretranslatepy==2.1.1
lxml==4.7.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
more-itertools==8.12.0; python_version >= '3.5'
multidict==5.2.0; python_version >= '3.6'
lxml==4.8.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
more-itertools==8.13.0; python_version >= '3.5'
multidict==6.0.2; python_full_version >= '3.7.0'
nightcore==1.1.0
numpy==1.22.1; python_version >= '3.8'
numpy==1.22.4; python_version >= '3.8'
outcome==1.1.0; python_version >= '3.6'
paho-mqtt==1.6.1
pexpect==4.8.0
pillow==9.0.0
pillow==9.1.1
profanity-check==1.0.3
progressbar2==4.0.0
ptyprocess==0.7.0
pycparser==2.21
pydub==0.23.1
pygithub==1.55
pygments==2.11.2; python_version >= '3.5'
pyjwt==2.3.0; python_version >= '3.6'
pymongo==4.0.1
pygments==2.12.0; python_version >= '3.6'
pyjwt==2.4.0; python_version >= '3.6'
pymongo==4.1.1
pynacl==1.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
pyopenssl==21.0.0
pyopenssl==22.0.0
pysocks==1.7.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
python-dotenv==0.19.2
python-utils==3.1.0; python_version >= '3.7'
python-dotenv==0.20.0
python-utils==3.2.3; python_full_version >= '3.7.0'
pyyaml==6.0
requests-futures==1.0.0
requests==2.27.1
rich==11.0.0
scikit-learn==1.0.2; python_version >= '3.7'
scipy==1.8.0rc2; python_version < '3.11' and python_version >= '3.8'
selenium==4.1.0
rich==12.4.1
scikit-learn==1.1.1; python_version >= '3.8'
scipy==1.8.1; python_version < '3.11' and python_version >= '3.8'
selenium==4.1.5
six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
sniffio==1.2.0; python_version >= '3.5'
sortedcontainers==2.4.0
soupsieve==2.3.1; python_version >= '3.6'
soupsieve==2.3.2.post1; python_version >= '3.6'
stem==1.8.0
threadpoolctl==3.0.0; python_version >= '3.6'
threadpoolctl==3.1.0; python_version >= '3.6'
torrequest==0.1.0
translate==3.6.1
trio-websocket==0.9.2; python_version >= '3.5'
trio==0.19.0; python_version >= '3.6'
typing-extensions==4.0.1; python_version >= '3.6'
unidecode==1.3.2
urllib3[secure]==1.26.8; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'
trio==0.20.0; python_full_version >= '3.7.0'
typing-extensions==4.2.0; python_version < '3.9'
unidecode==1.3.4
urllib3[secure,socks]==1.26.9; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4.0'
wikipedia==1.4.0
wolframalpha==5.0.0
wrapt==1.13.3; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
wsproto==1.0.0; python_full_version >= '3.6.1'
xmltodict==0.12.0
wrapt==1.14.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
wsproto==1.1.0; python_full_version >= '3.7.0'
xmltodict==0.13.0; python_version >= '3.4'
yarl==1.7.2; python_version >= '3.6'
youtube-dl==2021.12.17