Advertisement
vadadafas

Untitled

Sep 22nd, 2020
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. import discord
  2. from discord.ext import commands
  3. from config import settings
  4. import oli
  5. client = discord.Client(self_bot=True)
  6. g = 0
  7. bo=0
  8. letters = [
  9. '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '(', ')', '+', '-', '/',
  10. '*', ' '
  11. ]
  12. admins = ['561428675162013696', '439700828446785537']
  13. bot = commands.Bot(command_prefix=settings['prefix'])
  14.  
  15.  
  16.  
  17. @bot.event
  18. async def on_message(message):
  19. global g, bo
  20. if (message.author.id == bot.user.id):
  21.  
  22. ml = list(message.content.split(' '))
  23. if ml[0] == 's.spam':
  24. arg = int(ml.pop(1))
  25. a=ml.pop(0)
  26. i = 1
  27. while i <= arg:
  28. await message.channel.send(' '.join(ml))
  29. i += 1
  30. elif ml[0] == 'бот':
  31. if bo:
  32. bo = 0
  33. else:
  34. bo = 1
  35. await message.delete()
  36. else:
  37. if bo:
  38. embedd = discord.Embed(
  39. color=0xff0000, description=(' '.join(ml)))
  40. await message.edit(content=None, embed=embedd)
  41.  
  42. else:
  43. for el in admins:
  44. el = int(el)
  45. if message.author.id == el:
  46. if message.content == 'м?':
  47. while True:
  48. a = input()
  49. await message.channel.send(f'{a}')
  50. elif message.content == 'fdbg':
  51. if g == 0:
  52. await message.channel.send('дебаг режим включен')
  53. g = 1
  54. else:
  55. await message.channel.send('дебаг режим выключен')
  56. g = 0
  57.  
  58. await bot.process_commands(message)
  59.  
  60. oli.keep_alive()
  61. bot.run('token', bot=False)
  62.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement