updates
This commit is contained in:
parent
81cb93a6aa
commit
9a3a62f451
@ -2,4 +2,5 @@ from .nudity import Nudity
|
||||
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(Nudity(bot))
|
||||
n = Nudity(bot)
|
||||
bot.add_cog(n)
|
||||
|
@ -17,4 +17,4 @@
|
||||
"utils",
|
||||
"tools"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -17,14 +17,11 @@ class Nudity:
|
||||
self.bot = bot
|
||||
self.config = Config.get_conf(self, identifier=9811198108111121, force_registration=True)
|
||||
|
||||
default_guild = {
|
||||
"enabled": False,
|
||||
"channel_id": None
|
||||
}
|
||||
default_guild = {"enabled": False, "channel_id": None}
|
||||
|
||||
self.config.register_guild(**default_guild)
|
||||
|
||||
@commands.command(aliases=['togglenudity'], name='nudity')
|
||||
@commands.command(aliases=["togglenudity"], name="nudity")
|
||||
async def nudity(self, ctx: commands.Context):
|
||||
"""Toggle nude-checking on or off"""
|
||||
is_on = await self.config.guild(ctx.guild).enabled()
|
||||
@ -73,7 +70,9 @@ class Nudity:
|
||||
if nsfw_channel is None:
|
||||
return
|
||||
else:
|
||||
await nsfw_channel.send("NSFW Image from {}".format(message.channel.mention), file=image)
|
||||
await nsfw_channel.send(
|
||||
"NSFW Image from {}".format(message.channel.mention), file=image
|
||||
)
|
||||
|
||||
async def on_message(self, message: discord.Message):
|
||||
if not message.attachments:
|
||||
@ -115,6 +114,7 @@ class Nudity:
|
||||
print("Is not nude")
|
||||
await message.add_reaction("✅")
|
||||
|
||||
|
||||
# async def fetch_img(session, url):
|
||||
# with aiohttp.Timeout(10):
|
||||
# async with session.get(url) as response:
|
||||
|
Loading…
x
Reference in New Issue
Block a user