WIP #32
This commit is contained in:
parent
f2b6638616
commit
daa3c7aa0d
3 changed files with 9 additions and 23 deletions
|
@ -6,7 +6,7 @@ stages:
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
GL_TOKEN: $GL_TOKEN
|
GL_TOKEN: $GL_TOKEN
|
||||||
VERSION: '0.2.8'
|
VERSION: '0.2.9'
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
|
|
@ -291,27 +291,13 @@ class Texte(commands.Cog):
|
||||||
sentence = ' '.join(message)
|
sentence = ' '.join(message)
|
||||||
channel = [x for x in self.bot.get_all_channels() if x.name == self.text_chan][0]
|
channel = [x for x in self.bot.get_all_channels() if x.name == self.text_chan][0]
|
||||||
guild = self.bot.guilds[0]
|
guild = self.bot.guilds[0]
|
||||||
if sentence.startswith('!'):
|
for word in sentence.split():
|
||||||
command_name = sentence.split()[0].replace('!', '')
|
if word.startswith('@'):
|
||||||
cmd = self.bot.get_command(command_name)
|
members = guild.members
|
||||||
ctx.channel = channel
|
for member in members:
|
||||||
ctx.guild = guild
|
if member.display_name.lower() in word.lower():
|
||||||
for word in sentence.split():
|
sentence = sentence.replace(word, member.mention)
|
||||||
if word.startswith('@'):
|
await channel.send(sentence)
|
||||||
members = guild.members
|
|
||||||
for member in members:
|
|
||||||
if member.nick.lower() == wordi.lower()[1:]:
|
|
||||||
sentence = sentence.replace(word, member.mention)
|
|
||||||
ctx.message.content = sentence
|
|
||||||
await cmd.invoke(ctx)
|
|
||||||
else:
|
|
||||||
for word in sentence.split():
|
|
||||||
if word.startswith('@'):
|
|
||||||
members = guild.members
|
|
||||||
for member in members:
|
|
||||||
if member.display_name.lower() in word.lower():
|
|
||||||
sentence = sentence.replace(word, member.mention)
|
|
||||||
await channel.send(sentence)
|
|
||||||
|
|
||||||
@commands.command(help='Who the fuck am i?')
|
@commands.command(help='Who the fuck am i?')
|
||||||
async def schizo(self, ctx, *names):
|
async def schizo(self, ctx, *names):
|
||||||
|
|
|
@ -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.8',
|
version='0.2.9',
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue