Exemplo n.º 1
0
    async def redditpost(self, ctx: commands.Context, *, subreddit=None):
        """Description: Grabs a post from a desired subreddit, provided by the user, if the post is NSFW it will only display on NSFw channels\nArguments: `1`"""
        self.forbidden = ["c**k", "ass", "sex", "dick", "penis", "pussy"]
        self.current_subreddit = subreddit
        if self.current_subreddit is None:
            await ctx.send(
                embed=errorhandler.BotAlert("warn", "Give me a Subreddit.").get_error_embed()
            )
            raise errorhandler.CommandBreaker
        async with ctx.typing():
            try:
                self.reddit_post = conf.get_reddit_post(self.current_subreddit)
            except NotFound:
                raise errorhandler.CommandRedditBreaker(404)
            except Forbidden:
                raise errorhandler.CommandRedditBreaker(403)
            if (self.reddit_post.is_nsfw) and (ctx.channel.is_nsfw() is False):
                raise errorhandler.CommandRedditBreaker(100)
            self.string_test_result = any(
                element in self.current_subreddit for element in self.forbidden
            )
            if self.string_test_result and (ctx.channel.is_nsfw() is False):
                raise errorhandler.CommandRedditBreaker(0)

            embed_message = embeds.RedditEmbedMessage(
                self.reddit_post, "post",
            ).get_embed_message()

            await ctx.send(embed=embed_message)
Exemplo n.º 2
0
 async def dogememe(self, ctx):
     """Description:  Grabs a random meme from r/Dogelore and posts it in chat\nArguments: `None`"""
     async with ctx.typing():
         self.reddit_post = conf.get_reddit_post("dogelore")
         embed_message = embeds.RedditEmbedMessage(
             self.reddit_post, "meme",
         ).get_embed_message()
     await ctx.send(embed=embed_message)
Exemplo n.º 3
0
 async def lewdfemboy(self, ctx):
     """Description:  Grabs an image from r/femboys and shows it to the user.\nArguments: `None`"""
     if ctx.channel.is_nsfw():
         self.reddit_post = conf.get_reddit_post("femboys")
         await ctx.send(self.reddit_post.image)
     else:
         await ctx.send(embed=errorhandler.BotAlert(
             "error",
             "Can't post NSFW in non-NSFW channels.").get_error_embed())
Exemplo n.º 4
0
 async def cringe(self, ctx):
     """Description:  Grabs an image from the following Subreddits:\n •PewDiePieSubmissions\n   •Dankmemes\n    •memes\n •meme\n •gamging \nand posts it in chat\nArguments: `None`"""
     async with ctx.typing():
         self.current_subreddit = random.choice(
             ["pewdiepiesubmissions", "dankmemes", "meme", "memes", "gaming"]
         )
         self.reddit_post = conf.get_reddit_post(
             self.current_subreddit, only_image=True
         )
         embed_message = embeds.RedditEmbedMessage(
             self.reddit_post, "meme",
         ).get_embed_message()
     await ctx.send(embed=embed_message)
Exemplo n.º 5
0
 async def redditmeme(self, ctx):
     """Description:  Grabs an image from the following subreddits:\n •me_irl\n   •okbuddyret*rd\n    •okbuddylinux\n •surrealmemes\n  •comedyheaven\n    •comedynecrophilia\n    •comedyseizure\n    •comedycementery\n•DeepFriendMemes \nand posts it in the chat.\nArguments: `None`"""
     async with ctx.typing():
         self.current_subreddit = random.choice(
             [
                 "me_irl",
                 "okbuddyretard",
                 "okbuddylinux",
                 "surrealmemes",
                 "comedyheaven",
                 "comedynecrophilia",
                 "ComedySeizure",
                 "ComedyCemetery",
                 "DeepFriedMemes",
             ]
         )
         self.reddit_post = conf.get_reddit_post(
             self.current_subreddit, only_image=True
         )
         embed_message = embeds.RedditEmbedMessage(
             self.reddit_post, "meme",
         ).get_embed_message()
     await ctx.send(embed=embed_message)
Exemplo n.º 6
0
 async def femboy(self, ctx):
     """Description: Grabs an image from r/femboy, and displays it \nArguments: `None`"""
     reddit_post = conf.get_reddit_post("femboy")
     await ctx.send(reddit_post.image)
Exemplo n.º 7
0
 async def boyfriend(self, ctx):
     """Description: Grabs an image from r/ladybonners, and displays it \nArguments: `None`"""
     self.reddit_post = conf.get_reddit_post("ladyboners")
     await ctx.send(self.reddit_post.image)
Exemplo n.º 8
0
 async def rat(self, ctx):
     """Description: Grabs an image from r/RATS and posts it in chat\nArguments: `none`"""
     self.reddit_post = conf.get_reddit_post("RATS", True)
     await ctx.send(self.reddit_post.image)