Study-Together-Org / time_counter

12 stars 5 forks source link

Code explaination needed #3

Closed Zackhardtoname closed 3 years ago

Zackhardtoname commented 3 years ago

if self.bot.get_guild(self.bot.guild_id).get_role(685967088170696715) in self.bot.get_guild( self.bot.guild_id).get_member(user.id).roles: foot = "⭐ " + foot

No idea what this is about

Gugu7264 commented 3 years ago

This check if the member is a Supporter, if it is, it adds a star next to their name in the embed footer

Zackhardtoname commented 3 years ago
game = discord.Game(f"{self.bot.month} statistics")
await self.bot.change_presence(status=discord.Status.online, activity=game)

is this necessary? @Gugu7264

Zackhardtoname commented 3 years ago
async def botSpam(ctx):
        if ctx.channel.id in [666352633342197760, 695434541233602621, 715581625425068053, 699007476686651613, 674590052390535168, 738091719073202327]:
            return True

What about this? Could you write a script to give me a jsonized file of guild object or some mapping so I can look things up myself in the future? Thanks!

Zackhardtoname commented 3 years ago
if self.client.pool is None:
    self.client.pool = await aiomysql.create_pool(

@Gugu7264 Could you kindly explain why we need to do this? I don't know what the pool attribute is doing.

Gugu7264 commented 3 years ago
game = discord.Game(f"{self.bot.month} statistics")
await self.bot.change_presence(status=discord.Status.online, activity=game)

is this necessary? @Gugu7264

Yes! It's the bot status!

Gugu7264 commented 3 years ago
async def botSpam(ctx):
        if ctx.channel.id in [666352633342197760, 695434541233602621, 715581625425068053, 699007476686651613, 674590052390535168, 738091719073202327]:
            return True

What about this?

This checks if the user is in an allowed channels for bot commands.

Could you write a script to give me a jsonized file of guild object or some mapping so I can look things up myself in the future? Thanks!

Wdym?

Gugu7264 commented 3 years ago
if self.client.pool is None:
    self.client.pool = await aiomysql.create_pool(

@Gugu7264 Could you kindly explain why we need to do this? I don't know what the pool attribute is doing.

This allows having multiple connections, it's better to use when you have a lot of concurrent queries