Exemplo n.º 1
0
 async def on_disconnect(self):
     dc_time = datetime.now()
     dc_msg = "Bot disconnected at {}".format(dc_time)
     Logger.log_write(
         "----------------------------------------------------------\n"
         "{}\n"
         "".format(dc_msg))
     print(dc_msg)
Exemplo n.º 2
0
 async def on_ready(self):
     # https://discordpy.readthedocs.io/en/latest/api.html#discord.on_connect
     self.update_json_time(update_reconnect_time=True)
     login_msg = "Bot Connected at {}".format(str(datetime.now()))
     Logger.log_write(
         "----------------------------------------------------------\n"
         "{}\n"
         "".format(login_msg))
     print(login_msg)
Exemplo n.º 3
0
    async def on_ready(self):
        DiscordComponents(self)

        self.reconnect_time = datetime.utcnow()
        login_msg = "Bot Connected at {} UTC".format(str(datetime.utcnow()))
        Logger.log_write(
            "----------------------------------------------------------\n"
            "{}\n"
            "".format(login_msg))
        print(login_msg)

        self.ensure_all_fields_server()
        IO.write_server(self.servers_config)