Maki is a Discord bot that does things. Written in Python 3 and relies on Discord.py API implementation.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

46 lignes
1.2KB

  1. # Maki
  2. # ----
  3. # Discord bot by MrDetonia
  4. #
  5. # Copyright 2018 Zac Herd
  6. # Licensed under BSD 3-clause License, see LICENSE.md for more info
  7. # IMPORTS
  8. import os
  9. import json
  10. # bot version
  11. version = "v1.1.0"
  12. # TODO: generate this on the fly and make it look acceptable
  13. # text shown by .help command
  14. helptext = """I am **Maki**, a Discord bot written in Python
  15. My commands are:
  16. **.help** | displays this text
  17. **.info** | prints bot info
  18. **.upskirt** | show a link to my source
  19. **.whoami** | displays your user info
  20. **.whois <user>** | displays another user's info
  21. **.seen <user>** | prints when user was last seen
  22. **.say <msg>** | say something
  23. **.sayy <msg>** | say something a e s t h e t i c a l l y
  24. **.markov [<user>]** | generate markov chain over chat history for you or another user
  25. **.roll <num>d<val>** | roll x number of y sided dice
  26. **.qr <msg>** | generate a QR code
  27. **.np [<user>]** | fetch now playing from last.fm for you or a specific username
  28. **.steam [<user>]** | fetch steam status for you or a specific vanityname
  29. """
  30. # IDs of admin users
  31. admins = ['116883900688629761']
  32. # log of users' last messages and timestamps
  33. history = {}
  34. if os.path.isfile('hist.json'):
  35. with open('hist.json', 'r') as fp:
  36. history = json.load(fp)
  37. # quiet modes
  38. quiet = {}