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:
|
||||
GL_TOKEN: $GL_TOKEN
|
||||
VERSION: '0.2.8'
|
||||
VERSION: '0.2.9'
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
|
|
|
@ -291,27 +291,13 @@ class Texte(commands.Cog):
|
|||
sentence = ' '.join(message)
|
||||
channel = [x for x in self.bot.get_all_channels() if x.name == self.text_chan][0]
|
||||
guild = self.bot.guilds[0]
|
||||
if sentence.startswith('!'):
|
||||
command_name = sentence.split()[0].replace('!', '')
|
||||
cmd = self.bot.get_command(command_name)
|
||||
ctx.channel = channel
|
||||
ctx.guild = guild
|
||||
for word in sentence.split():
|
||||
if word.startswith('@'):
|
||||
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)
|
||||
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?')
|
||||
async def schizo(self, ctx, *names):
|
||||
|
|
|
@ -61,6 +61,6 @@ setup(
|
|||
test_suite='tests',
|
||||
tests_require=test_requirements,
|
||||
url='https://github.com/None/kabot',
|
||||
version='0.2.8',
|
||||
version='0.2.9',
|
||||
zip_safe=False,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue