Пример #1
0
 def __init__(self, bot):
     self.bot = bot
     with open('data/apikeys.json') as f:
         lol = json.load(f)
     self.token = lol.get("idioticapi")
     self.client = idioticapi.Client(self.token, dev=True)
     self.bananapi = bananapy.Client(self.bot.config.bananapi)
Пример #2
0
 def __init__(self, bot):
     self.bot = bot
     self.session = self.bot.session
     with open('data/tokens.json') as f:
         lol = json.load(f)
         self.token = lol['idioticapi']
         self.apikey = lol['brotatapi']
     self.client = idioticapi.Client(self.token, dev=True, session = self.bot.session)
Пример #3
0
 async def triggeredpic(self, ctx, user: discord.Member = None):
     """TRI GER RED!!!"""
     if user is None:
         user = ctx.author
     try:
         client = idioticapi.Client(self.client, dev=True)
         av = self.format_avatar(user.avatar_url)
         await ctx.send(
             file=discord.File(await client.triggered(av), "triggered.gif"))
     except Exception as e:
         await ctx.send(
             f"An error occured with IdioticAPI. \nMore details: \n{e}")
Пример #4
0
 async def batslap(self, ctx, user: discord.Member = None):
     """User 1 will be slapping, user 2 will BE SLAPPED! Tehehe!"""
     if user is None:
         await ctx.send("Gotta tag someone that you wanna slap!")
     else:
         try:
             client = idioticapi.Client(self.client, dev=True)
             av = self.format_avatar(user.avatar_url)
             avatar = self.format_avatar(ctx.author.avatar_url)
             await ctx.send(file=discord.File(
                 await client.bat_slap(avatar, av), "batslap.png"))
         except Exception as e:
             await ctx.send(
                 f"An error occured with IdioticAPI. \nMore details: \n{e}")
Пример #5
0
 def __init__(self, bot):
     self.bot = bot
     self.token = "IRBLqNpbDMqlR8d29fdP"
     self.client = idioticapi.Client(self.token, dev=True)
Пример #6
0
 def __init__(self, bot):
     self.bot = bot
     self.token = os.environ.get("IDIOTICAPI")
     self.client = idioticapi.Client(self.token, dev=True)
Пример #7
0
 def __init__(self, bot):
     self.bot = bot
     self.client = idioticapi.Client(os.environ.get("IDIOTICAPI"),
                                     dev=True,
                                     session=self.bot.session)
Пример #8
0
 def __init__(self, bot):
     self.bot = bot
     self.token = x['keys']['idiotickey']
     self.client = idioticapi.Client(self.token, dev=True)
Пример #9
0
async def on_message(message):
    if message.author.bot:
        return

    await bot.process_commands(message)


def dev_check(id):
    with open('data/devs.json') as f:
        devs = json.load(f)
    if id in devs:
        return True
    return False


bot.api = idioticapi.Client((os.environ.get("IDIOTICAPI")), dev=True)


@bot.event
async def on_guild_join(guild):
    lol = bot.get_channel(438526627824271362)
    em = discord.Embed(color=discord.Color(value=0x11f95e))
    em.title = "I have joined new server!"
    em.description = f"Server: {guild}"
    em.set_footer(text=f"ID: {guild.id}")
    em.set_thumbnail(url=guild.icon_url)
    await lol.send(embed=em)
    try:
        await guild.channels[0].send(
            f"Hello my peeps. Im a discord bot created by L3NNY#4519. Try me out by doing ``+help``!"
        )
Пример #10
0
 def __init__(self, bot):
     self.bot = bot
     # self.api = idioticapi.Client(token=bot.auth.get("idioticapi"), dev=True)
     self.api = idioticapi.Client(token=os.environ.get('idiotickey'),
                                  dev=True)
Пример #11
0
 def __init__(self, bot):
     self.bot = bot
     self.client = idioticapi.Client(os.environ.get('idioticapi'), dev=True)