Selaa lähdekoodia

ninja edit

tags/v1.1.0
roxie 6 vuotta sitten
vanhempi
commit
4be604dc95
1 muutettua tiedostoa jossa 3 lisäystä ja 4 poistoa
  1. +3
    -4
      main.py

+ 3
- 4
main.py Näytä tiedosto



# Sets up Logging that discord.py does on its own # Sets up Logging that discord.py does on its own
logger = logging.getLogger('discord') logger = logging.getLogger('discord')
logger.setLevel(logging.DEBUG)
logger.setLevel(logging.INFO)
handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w') handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w')
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s')) handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
logger.addHandler(handler) logger.addHandler(handler)


server_config = ServerConfig() server_config = ServerConfig()
bot = commands.Bot(command_prefix=load_config.command_prefix, description=load_config.description) bot = commands.Bot(command_prefix=load_config.command_prefix, description=load_config.description)
bot.dev = True # For debugging
bot.dev = False # For debugging
bot.owner = load_config.owner bot.owner = load_config.owner


def blacklisted(user): def blacklisted(user):
print("") print("")


# Testing Code # Testing Code
game = discord.Game(name="Rewriting Moi for v{}".format(load_config.version), type=0)
game = discord.Game(name="v{}".format(load_config.version), type=0)
await bot.change_presence(game=game) await bot.change_presence(game=game)
print("Game Changed")




@bot.event @bot.event

Loading…
Peruuta
Tallenna