Exemple #1
0
 async def reddit(self, ctx, subr=None):
     if subr == None:
         await self.client.send_message(
             ctx.message.channel,
             ctx.message.author.mention + " Please specify a subreddit.")
     else:
         url = "https://api.reddit.com/r/" + subr + "/top/.json?sort=top&t=week&limit=100"
         await self.client.send_message(ctx.message.channel,
                                        embed=hp.redditEmbed(url))
Exemple #2
0
async def on_ready():
    await client.change_presence(game=discord.Game(
        name='type "pls help" for more info'))
    print('Running an instance of ' + client.user.name + ' {' +
          client.user.id + '}')
    print('Bot is ready. \n -----------------------------------------------')
    url = "https://api.reddit.com/user/pete7201/m/dankmemenetwork/top.json?sort=top&t=day&limit=100"
    chanl = get_channel(client.get_all_channels(), 'bots')

    while True:
        await asyncio.sleep(60 * 60 * 24)  #every 24 hours
        embed = hp.redditEmbed(url)
        embed.set_author(name="~~~~~ TODAY'S DAILY MEME ~~~~~")
        await client.send_message(chanl, embed=embed)
Exemple #3
0
 async def pun(self, ctx):
     url = "https://api.reddit.com/r/puns/top/.json?sort=top&t=week&limit=100"
     await self.client.send_message(ctx.message.channel,
                                    embed=hp.redditEmbed(url))
Exemple #4
0
 async def joke(self, ctx):
     url = "https://api.reddit.com/r/Jokes/top.json?sort=top&t=day&limit=100"
     await self.client.send_message(ctx.message.channel,
                                    embed=hp.redditEmbed(url))
Exemple #5
0
 async def meme(self, ctx):
     url = "https://api.reddit.com/user/pete7201/m/dankmemenetwork/top.json?sort=top&t=day&limit=100"
     await self.client.send_message(ctx.message.channel,
                                    embed=hp.redditEmbed(url))