Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- from discord.ext import commands
- from config import settings
- import oli
- client = discord.Client(self_bot=True)
- g = 0
- bo=0
- letters = [
- '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '(', ')', '+', '-', '/',
- '*', ' '
- ]
- admins = ['561428675162013696', '439700828446785537']
- bot = commands.Bot(command_prefix=settings['prefix'])
- @bot.event
- async def on_message(message):
- global g, bo
- if (message.author.id == bot.user.id):
- ml = list(message.content.split(' '))
- if ml[0] == 's.spam':
- arg = int(ml.pop(1))
- a=ml.pop(0)
- i = 1
- while i <= arg:
- await message.channel.send(' '.join(ml))
- i += 1
- elif ml[0] == 'бот':
- if bo:
- bo = 0
- else:
- bo = 1
- await message.delete()
- else:
- if bo:
- embedd = discord.Embed(
- color=0xff0000, description=(' '.join(ml)))
- await message.edit(content=None, embed=embedd)
- else:
- for el in admins:
- el = int(el)
- if message.author.id == el:
- if message.content == 'м?':
- while True:
- a = input()
- await message.channel.send(f'{a}')
- elif message.content == 'fdbg':
- if g == 0:
- await message.channel.send('дебаг режим включен')
- g = 1
- else:
- await message.channel.send('дебаг режим выключен')
- g = 0
- await bot.process_commands(message)
- oli.keep_alive()
- bot.run('token', bot=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement