예제 #1
0
 async def on_guild_join(self, guild):
     mongo.insert(guild, mongo.guildModel, db.guilds)
     channel = self.bot.get_guild(config.home_guild).get_channel(
         config.log_channel)
     await channel.send(embed=discord.Embed(
         title="Joined new server!",
         description=
         f"**Name:** {guild.name}\n**Size:** {guild.member_count-1} members\nCurrently in {len(self.bot.guilds)} servers!"
     ))
예제 #2
0
    async def daily(self, ctx):
        user = ctx.author
        mongo.insert(user, mongo.userModel, db.users)

        mongo.update({"_id": user.id}, {'$inc': {"bal": 5}}, db.users)
        embed = discord.Embed(
            title=":hibiscus: :tooth: Daily teeth :tooth: :hibiscus:",
            description=
            "Gave {0} **5** teeth! \nCome back in **24** hours for a new claim <3"
            .format(user.name))
        await ctx.send(content="", embed=embed)
예제 #3
0
    async def balance(self, ctx):
        user = ctx.author

        mongo.insert(user, mongo.userModel, db.users)
        bal = mongo.find({"_id": user.id}, db.users)['bal']

        embed = discord.Embed(
            title=":hibiscus: {0}'s balance :hibiscus:".format(user.name),
            description="You can use teeth to buy items or upgrades for me!")
        embed.add_field(name="Teeth", value=f"{bal}:tooth:")
        embed.add_field(
            name="Want more?",
            value=
            f"Get teeth with daily commands, from crates, or by voting for me on top.gg <3 To get a vote link, run {Config.prefix}vote. Remember that you can only vote once per 12 hours..."
        )
        await ctx.send(content="", embed=embed)
예제 #4
0
 async def on_guild_join(self, guild):
     mongo.insert(guild, mongo.guildModel, db.guilds)
예제 #5
0
 async def test(self, ctx, *args):
     mongo.insert(ctx.guild, mongo.guildModel, db.guilds)
예제 #6
0
 async def dbscan(self, ctx, *args):   
     r = mongo.insert(ctx.guild.members, mongo.userModel, db.users)
     await ctx.send(f"inserted {r} docs")