mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 14:27:27 +00:00
WIP selfbot config option
This commit is contained in:
parent
8c15767da8
commit
e6a098c211
2 changed files with 8 additions and 4 deletions
|
@ -102,8 +102,12 @@ async def on_ready():
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_message(message):
|
async def on_message(message):
|
||||||
if message.author is not bot.user and not message.author.bot:
|
if u.config['selfbot'] == 'False':
|
||||||
await bot.process_commands(message)
|
if message.author is not bot.user and not message.author.bot:
|
||||||
|
await bot.process_commands(message)
|
||||||
|
else:
|
||||||
|
if not message.author.bot:
|
||||||
|
await bot.process_commands(message)
|
||||||
|
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
|
@ -162,7 +166,7 @@ async def on_command_completion(ctx):
|
||||||
for command in ('lastcommand', ',restart', ',die'):
|
for command in ('lastcommand', ',restart', ',die'):
|
||||||
if ctx.command.name == command:
|
if ctx.command.name == command:
|
||||||
return
|
return
|
||||||
|
|
||||||
u.last_commands[ctx.author.id] = ctx
|
u.last_commands[ctx.author.id] = ctx
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
|
|
|
@ -30,7 +30,7 @@ try:
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
with open('config.json', 'w') as outfile:
|
with open('config.json', 'w') as outfile:
|
||||||
jsn.dump({'client_id': 0, 'info_channel': 0, 'owner_id': 0, 'permissions': 126016,
|
jsn.dump({'client_id': 0, 'info_channel': 0, 'owner_id': 0, 'permissions': 126016,
|
||||||
'playing': 'a game', 'prefix': [',', 'm,'], 'token': 'str'}, outfile, indent=4, sort_keys=True)
|
'playing': 'a game', 'prefix': [',', 'm,'], 'selfbot': 'False', 'token': 'str'}, outfile, indent=4, sort_keys=True)
|
||||||
raise FileNotFoundError(
|
raise FileNotFoundError(
|
||||||
'FILE NOT FOUND : config.json created with abstract values. Restart run.py with correct values')
|
'FILE NOT FOUND : config.json created with abstract values. Restart run.py with correct values')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue