Example #1
0
async def change_status(ctx, *, message: str):
    if str(ctx.message.author) == "ExtremisVis#3182":
        await bot.change_presence(activity=Game(name=message))
    else:
        await ctx.send(
            "You do not have the required permissions to preform this command."
        )
Example #2
0
    async def process_tracker(self, tag, info):
        await self.change_presence(activity=Game(f'Checking...'))
        if not info:
            log.info(f'Retrieving info about {tag} for the first time')
            old_info = await e.parse(tag)
            if old_info is None:
                log.error('Failed to retrieve info')
                return
            e.log_parsed(old_info, 'NEW')
            info = pickle.dumps(old_info)
            self.update_info(tag, info)
        else:
            old_info = pickle.loads(info)
            e.log_parsed(old_info, 'OLD')

            new_info = await e.parse(tag)
            if new_info is None:
                log.error('Failed to retrieve info')
                return
            e.log_parsed(new_info, 'NEW')
            diff = e.extract(old_info, new_info)
            if diff:
                e.log_extracted(diff)
                info = pickle.dumps(new_info)
                self.update_info(tag, info)
                img = p.make_post(diff)
                post = get_file_to_send(img)
                awaitables = [
                    self.send_posts(post, channel_id)
                    for channel_id in self.get_channels(tag)
                ]
                await asyncio.wait(awaitables)
            else:
                log.info(f'No updates for {tag}')
Example #3
0
async def on_ready():
    print('Logged in as')
    print(bot.user.name)
    print(bot.user.id)
    print('- - - - - -')
    await bot.change_presence(activity=Game(
        name="Programming: The Andres/Colin Odyssey"))
Example #4
0
async def on_ready():
    await client.change_presence(game=Game(name="with fellow humans"))
    print("Logged in as " + client.user.name)
    servers = list(client.servers)
    print("Connected on " + str(len(client.servers)) + " servers:")
    for x in range(len(servers)):
        print('    ' + servers[x - 1].name)
Example #5
0
File: tau.py Project: osamagmt/tau
async def on_ready():
    app_info = await bot.application_info()
    bot.owner_id = app_info.owner.id

    prefix = bot.guilds_.default['prefix']
    await bot.change_presence(activity=Game(name=f'{prefix}help'))

    ccp.ready(f'Logged in as {bot.user.name}')
    ccp.ready(f'ID: {bot.user.id}')
    bot.url = oauth_url(client_id=bot.user.id,
                        permissions=Permissions(permissions=8))
    ccp.ready(f'URL: \u001b[1m\u001b[34m{bot.url}\u001b[0m')

    for guild in bot.guilds:
        if guild.id not in bot.guilds_.keys():
            await bot.guilds_.insert(guild.id)
            if guild.system_channel:
                await bot.guilds_.update(guild.id, 'system_channel',
                                         guild.system_channel.id)

        if guild.me.guild_permissions.manage_guild:
            bot.invites_[guild.id] = await guild.invites()
            if 'VANITY_URL' in guild.features:
                vanity = await guild.vanity_invite()
                bot.invites_[guild.id].append(vanity)
Example #6
0
    async def on_ready(self):
        playing = Game("with spreadsheets")
        self.add_cogs()
        self.get_server_info()

        await self.change_presence(activity=playing)
        print("Ready! :)")
Example #7
0
 async def on_ready(self):
     load_cogs(self)
     await asyncio.sleep(3)
     print(
         '-----------------\nBruh Bot запущен!\nВерсия бота: 0.0.20\nАвтор бота: saywex89'
     )
     await bot.change_presence(activity=Game(name=bot_game))
Example #8
0
async def on_ready():
    await bot.change_presence(game=Game(name=command_prefix + "help (v. " +
                                        dbot_version + ")"))
    print('Logged in as')
    print(bot.user.name)
    print(bot.user.id)
    print('------')
Example #9
0
async def on_ready():
    """This function runs when the bot is started"""
    await client.change_presence(game=Game(name='the trumpet'))
    print('Logged in as')
    print(client.user.name)
    print(client.user.id)
    print('------')
Example #10
0
async def on_ready():
    # On log la connexion
    print('Logged on as {0}!'.format(bot.user))

    # On update le status
    await bot.change_presence(
        activity=Game('https://github.com/MPSI1Thuillier/Bot'))
Example #11
0
 async def on_ready(self):
     await self.tamago.change_presence(
         status=discord.Status.idle,
         activity=Game(name='Waking up, making coffee...'))
     LOG.info('Logged in as {}'.format(self.tamago.user.name))
     self.tamago.loop.create_task(utils.change_status(self.tamago))
     self.tamago.loop.create_task(utils.list_servers(self.tamago))
Example #12
0
async def on_ready():
    print("BOT STARTED\n-----------------")
    await client.change_presence(game=Game(
        name=functions.get_members_msg(client)))
    statistics.server = list(client.servers)[0]
    if not DEVMODE:
        statistics.start()
Example #13
0
async def status_task(bot):
    """Update the bot's status every 5 minutes"""
    await bot.wait_until_ready()
    while True:
        await asyncio.sleep(5 * 60)
        await bot.change_presence(
            activity=Game(name="music to " + str(len(bot.guilds)) + " guilds %shelp" % prefix))
Example #14
0
async def on_ready():
	print(discord.__version__)
	print('Logged in as')
	print(edelia.user.name)
	print(edelia.user.id)
	print('------')
	await edelia.change_presence(activity=Game(name="IA Become Humans"))
Example #15
0
async def on_ready():
    serverList = client.servers
    await client.change_presence(game=Game(name="| $help | $git |"))
    print("\nLogged in as " + client.user.name)
    for server in serverList:
        if not server.id in authServerList:
            await client.leave_server(client.get_server(server.id))
            print("\nLeft Server :: " + server.name)
Example #16
0
async def change_status():
    await bot.wait_until_ready()
    msg = cycle(status)

    while not bot.is_closed:
        current_status = next(msg)
        await bot.change_presence(game=Game(name=current_status))
        await asyncio.sleep(120)
Example #17
0
async def updatePresence():
    try:
        with open('queryCount.log', 'r') as rf:
            queries = rf.read()
        activity = Game(f"with {queries} answers")
        await bot.change_presence(activity=activity)
    except:
        fprint("presence update failed!")
Example #18
0
async def on_ready():
	await bot.change_presence(game=Game(name="Censorship Machine with the EU"))
	print ("Starting this shit. V2")
	print ("user.name: " + bot.user.name)
	print ("user.id: " + bot.user.id)
	print ("directory is: " + os.getcwd())
	print ("--------------------------------------")
	print ("bot made by: bitran")
Example #19
0
async def on_ready():
    await client.change_presence(game=Game(
        name="~help ¦ ~invite", url="https://www.twitch.tv/avibn", type=1))
    print("Logged in as " + client.user.name)
    print("Currently active on " + str(len(client.servers)) + " servers.")
    while True:
        await client.change_presence(game=Game(
            name="~help ¦ ~invite", url="https://www.twitch.tv/avibn", type=1))
        # await client.change_presence(game=Game(name="..help ¦ ..invite", type=3))
        await asyncio.sleep(20)
        await client.change_presence(
            game=Game(name=" {} Guilds.".format(len(client.servers)),
                      url="https://www.twitch.tv/avibn",
                      type=1))
        # await client.change_presence(game=Game(name="{} guilds".format(len(client.servers)), type=3))
        await asyncio.sleep(10)
    await asyncio.sleep(600)
Example #20
0
async def set_bot_playing(message, client, arguments):

    if message.author.id not in owners:
        return
    else:
        await client.change_presence(game=Game(name=arguments))
        send(1, "Updating playing status!")
    return
Example #21
0
    async def presenceTask(self):
        timeLeft = self.utility.timeUntil("optime")
        minutes = (timeLeft.seconds // 60) % 60
        minuteZero = "0" if minutes < 10 else ""
        presenceString = "{}:{}{}:00 until optime".format(
            timeLeft.seconds // 3600, minuteZero, minutes)

        await self.bot.change_presence(activity=Game(name=presenceString))
Example #22
0
    async def change_status(self, name):
        log.debug("Changing status to {}".format(name))
        log_to_file("Changing status to {}".format(name))

        shards = list(self.client.shards.keys())
        for shard_id in shards:
            customized = name + " | shard {}".format(shard_id + 1)
            await self.client.change_presence(game=Game(name=customized, type=0), shard_id=shard_id)
Example #23
0
async def on_ready():

    await client.change_presence(game=Game(name="!help"))

    print('Eingeloggt als')
    print(client.user.name)
    print(client.user.id)
    print('-----------')
async def on_ready():
    await bot.change_presence(game=Game(name="with Western Spy"))
    print("BLIN THIS BOT WORKS!")
    print("OPA BOT NAME: " + bot.user.name)
    print("OPA BOT ID: " + bot.user.id)
    print("BLIN DIRECTORY IS: " + os.getcwd())
    print("--------------------------------------")
    print("bot made by: bitran")
Example #25
0
    async def on_ready(self):
        await self.bot.change_presence(activity=Game(name=config.game))

        print('#' * 50)
        print(f'Id:     {self.bot.user.id:d}')
        print(f'Name:   {self.bot.user.name}#{self.bot.user.discriminator}')
        print(f"Guilds: {', '.join(guild.name for guild in self.bot.guilds)}")
        print('#' * 50)
Example #26
0
    async def on_ready():
        await client.change_presence(activity=Game(CONFIG['activity']))

        # Scrub dead links on start
        channel = client.get_channel(CONFIG['tree-channel-id'])
        async for message in channel.history(limit=1000):
            if message.author == client.user:
                await message.delete()
Example #27
0
 async def status(self, ctx, *args):
     """
     Updates "playing [game]" status of the bot
     """
     status = get_name(args)
     await self.bot.change_presence(activity=Game(status))
     await ctx.send('{}, status has been changed'.format(
         ctx.message.author.mention))
Example #28
0
async def on_ready():
    '''
    Shows that the bot's running when we run this program.
    '''
    await hat.change_presence(game = Game(name = 'with Dumbledore'))
    print("Bot Logging In!")
    print("Bot ID: " + hat.user.id)
    print(hat.user.name + " is ready!")
Example #29
0
 def __init__(self):
     with open('config.json') as f:
         self.config = Config(**ujson.loads(f.read()))
     self.api = Api(self)
     custom = Game(name='with a new rewrite')
     super().__init__(self.config.prefix,
                      status=Status.dnd,
                      activity=custom)
Example #30
0
    def on_ready(self):
        print("Bot is logged in succesfully. Running on servers: \n")
        for s in self.client.servers:
            print(" - %s (%s)" % (s.name, s.id))

        if 'presence_game' in self.config['bot']:
            yield from self.client.change_presence(game=Game(
                name=self.config['bot']['presence_game']))