Przeglądaj źródła

Modification de quelques commandes nsfw

master
Geekcat 1 rok temu
rodzic
commit
b9b3123644
1 zmienionych plików z 13 dodań i 1 usunięć
  1. +13
    -1
      cogs/nsfw.py

+ 13
- 1
cogs/nsfw.py Wyświetl plik

@@ -233,7 +233,7 @@ class Nsfw:
except Exception as e:
await self.bot.say(":x: `{}`".format(e))

@nsfw.command(pass_context=True, no_pm=True)
@commands.command(pass_context=True, no_pm=True)
async def neko(self, ctx):
"""A random neko image from nekos.py"""
channel_nsfw = await self.is_nsfw(ctx.message.channel)
@@ -245,6 +245,18 @@ class Nsfw:
except Exception as e:
await self.bot.say(":x: `{}`".format(e))

@commands.command(pass_context=True, no_pm=True)
async def yuri(self, ctx):
"""A random neko image from nekos.py"""
channel_nsfw = await self.is_nsfw(ctx.message.channel)
if not channel_nsfw:
await self.bot.say(nsfw_warning)
return
try:
await self.bot.say(nekos.img('yuri'))
except Exception as e:
await self.bot.say(":x: `{}`".format(e))

async def is_nsfw(self, channel: discord.Channel):
try:
_gid = channel.server.id