Example #1
0
async def on_ready():
    utils.print_timed("")
    print("Logged in as")
    print(bot.user.name)
    print(bot.user.id)
    print("------")

    f = open("infinityVoiceSaves.txt", "r")
    IV.infinityVoices = json_decoder(f.read())
    print(IV.infinityVoices)
    f.close()
Example #2
0
async def on_disconnect():
    utils.print_timed("Disconnected")
    save_infinities()
def save_infinities():
    f = open("InfinityVoiceSaves.txt", "w+")
    dump = json.dumps(infinityVoices, default=json_encoder)
    print_timed("Saving:" + dump)
    f.write(dump)
    f.close()
 async def reload(self, bot) -> None:
     print_timed("Reloading " + self.name_format.format(0))
     for i in range(len(self.active_channels)):
         infinity_voice.active_channels[i] = await bot.fetch_channel(
             self.active_channels[i].id)
     print_timed("Reload Finished " + self.name_format)