This commit is contained in:
Milka64 2023-12-29 14:48:17 +01:00
parent daa3c7aa0d
commit d33eb077a7
3 changed files with 3 additions and 14 deletions

View file

@ -6,7 +6,7 @@ stages:
variables: variables:
GL_TOKEN: $GL_TOKEN GL_TOKEN: $GL_TOKEN
VERSION: '0.2.9' VERSION: '0.2.10'
deploy: deploy:
stage: deploy stage: deploy

View file

@ -64,18 +64,7 @@ class Texte(commands.Cog):
@commands.Cog.listener() @commands.Cog.listener()
async def on_message(self, message): async def on_message(self, message):
if message.author == self.bot.user or message.content.startswith('!'): if message.author == self.bot.user and not message.content.startswith('!'):
if message.content.startswith('!'):
for channel in self.bot.get_all_channels():
if channel.name == self.text_chan:
current_chan = channel
async for msg in current_chan.history(limit=1):
last_message = msg
ctx = await self.bot.get_context(last_message)
ctx.message.content = ""
cmd_name = message.content.split()[0].replace('!','')
cmd = self.bot.get_command(cmd_name)
await cmd.invoke(ctx)
return return
else: else:
if self.bot.user in message.mentions \ if self.bot.user in message.mentions \

View file

@ -61,6 +61,6 @@ setup(
test_suite='tests', test_suite='tests',
tests_require=test_requirements, tests_require=test_requirements,
url='https://github.com/None/kabot', url='https://github.com/None/kabot',
version='0.2.9', version='0.2.10',
zip_safe=False, zip_safe=False,
) )