Add nsfw filter on message sending
This commit is contained in:
parent
82a8316a15
commit
abbb02f07a
1 changed files with 6 additions and 3 deletions
|
@ -255,7 +255,8 @@ class RedditCog(Scale):
|
||||||
return
|
return
|
||||||
|
|
||||||
embeds = await self.post_embeds(subreddit, post)
|
embeds = await self.post_embeds(subreddit, post)
|
||||||
await ctx.send(embeds=embeds)
|
ephemeral = post.over_18 and not ctx.channel.nsfw
|
||||||
|
await ctx.send(embeds=embeds, ephemeral=ephemeral)
|
||||||
|
|
||||||
@reddit.subcommand(sub_cmd_name="top", sub_cmd_description="Get the top post of a subreddit")
|
@reddit.subcommand(sub_cmd_name="top", sub_cmd_description="Get the top post of a subreddit")
|
||||||
@slash_option(
|
@slash_option(
|
||||||
|
@ -325,7 +326,8 @@ class RedditCog(Scale):
|
||||||
return
|
return
|
||||||
|
|
||||||
embeds = await self.post_embeds(subreddit, post)
|
embeds = await self.post_embeds(subreddit, post)
|
||||||
await ctx.send(embeds=embeds)
|
ephemeral = post.over_18 and not ctx.channel.nsfw
|
||||||
|
await ctx.send(embeds=embeds, ephemeral=ephemeral)
|
||||||
|
|
||||||
@reddit.subcommand(
|
@reddit.subcommand(
|
||||||
sub_cmd_name="rising", sub_cmd_description="Get a rising post of a subreddit"
|
sub_cmd_name="rising", sub_cmd_description="Get a rising post of a subreddit"
|
||||||
|
@ -354,7 +356,8 @@ class RedditCog(Scale):
|
||||||
return
|
return
|
||||||
|
|
||||||
embeds = await self.post_embeds(subreddit, post)
|
embeds = await self.post_embeds(subreddit, post)
|
||||||
await ctx.send(embeds=embeds)
|
ephemeral = post.over_18 and not ctx.channel.nsfw
|
||||||
|
await ctx.send(embeds=embeds, ephemeral=ephemeral)
|
||||||
|
|
||||||
|
|
||||||
def setup(bot: Snake) -> None:
|
def setup(bot: Snake) -> None:
|
||||||
|
|
Loading…
Add table
Reference in a new issue