commands + gifs: Added more commands and gifs
This commit is contained in:
parent
0839b38189
commit
2d30824ec3
2 changed files with 55 additions and 9 deletions
24
gifs.json
24
gifs.json
|
@ -7,7 +7,9 @@
|
|||
"https://media.tenor.com/J7eGDvGeP9IAAAAC/enage-kiss-anime-hug.gif",
|
||||
"https://media.tenor.com/bEKamK08go8AAAAd/hug-cat.gif"
|
||||
],
|
||||
"cuddle": ["https://media.tenor.com/OaSQqWO4-YUAAAAC/snuggle-anime.gif"],
|
||||
"cuddle": [
|
||||
"https://media.tenor.com/OaSQqWO4-YUAAAAC/snuggle-anime.gif"
|
||||
],
|
||||
"hold": [
|
||||
"https://media.tenor.com/-76rfR0BNTAAAAAC/anime-couple-hand-holding.gif"
|
||||
],
|
||||
|
@ -19,5 +21,25 @@
|
|||
"https://media.tenor.com/weSGHA3VWqwAAAAd/classic-ef-yuri.gif",
|
||||
"https://media.tenor.com/0LMxPQdFBKAAAAAC/nekopara-kiss.gif",
|
||||
"https://media.discordapp.net/attachments/775642657627832340/1077195063953723482/image1.gif"
|
||||
],
|
||||
"fuck": [
|
||||
"https://media.discordapp.net/attachments/857047804063907840/1005151333801795625/89CF232B-1310-4577-AECC-B4A143CF6DA1.gif"
|
||||
],
|
||||
"wag": [
|
||||
"https://cdn.discordapp.com/emojis/934937659091075092.gif",
|
||||
"https://media.discordapp.net/attachments/331911505173807115/1073969787438374962/48D51101-3155-469A-A178-6D002780331E.gif",
|
||||
"https://cdn.weeb.sh/images/rJCVcytDW.gif"
|
||||
],
|
||||
"lewd": [
|
||||
"https://cdn.weeb.sh/images/H18uap_vb.gif",
|
||||
"https://cdn.weeb.sh/images/rJgCSpp_wb.gif"
|
||||
],
|
||||
"boop": [
|
||||
"https://media.tenor.com/xEULDAPjA0YAAAAC/boop-anime-anime.gif",
|
||||
"https://media.tenor.com/l5XjHcppGN0AAAAd/boop.gif",
|
||||
"https://media.tenor.com/88HZjGgr3k0AAAAd/doggo-boop.gif"
|
||||
],
|
||||
"blush": [
|
||||
"https://tenor.com/view/shy-gif-27191515"
|
||||
]
|
||||
}
|
||||
|
|
40
main.py
40
main.py
|
@ -13,31 +13,55 @@ gifs = {}
|
|||
with open("gifs.json") as file:
|
||||
gifs = json.load(file)
|
||||
|
||||
HELP_MESSAGE= """
|
||||
Commands:
|
||||
```hug - Hugs target user
|
||||
kiss - Kisses target user
|
||||
cuddle - Cuddles with target user
|
||||
hold - Hold target user's hand
|
||||
pat - Gives the targeted user headpats
|
||||
wag - Makes the target user's tail wag
|
||||
fuck - Does some "stuff" to the target user 😳
|
||||
flush - Makes the target user blush
|
||||
lewd - Makes you say that it's too lewd
|
||||
boop - Boops target user
|
||||
help - shows this list```
|
||||
"""
|
||||
|
||||
# Commands
|
||||
# Gif commands
|
||||
|
||||
|
||||
async def gif_handler(message: discord.Message, command: list[str]):
|
||||
gif_kind = command[0]
|
||||
async def command_handler(message: discord.Message, command: list[str]):
|
||||
command_typed = command[0]
|
||||
|
||||
target = message.author.name
|
||||
if len(message.mentions) > 0:
|
||||
target = message.mentions[0].name
|
||||
|
||||
if gif_kind not in gifs:
|
||||
if command_typed == "help":
|
||||
await message.reply(HELP_MESSAGE)
|
||||
return
|
||||
|
||||
if command_typed not in gifs:
|
||||
await message.reply(
|
||||
"im so sorry, i have no such thing to give you for now... come back later :3")
|
||||
return
|
||||
|
||||
choosen_gif = random.choice(gifs[gif_kind])
|
||||
choosen_gif = random.choice(gifs[command_typed])
|
||||
await message.reply(f"here u go {target}\n{choosen_gif}")
|
||||
|
||||
GIF_COMMANDS = [
|
||||
COMMANDS = [
|
||||
"hug",
|
||||
"kiss",
|
||||
"cuddle",
|
||||
"hold",
|
||||
"pat",
|
||||
"wag",
|
||||
"fuck",
|
||||
"blush",
|
||||
"help",
|
||||
"lewd",
|
||||
"boop",
|
||||
]
|
||||
|
||||
# Discord events
|
||||
|
@ -52,8 +76,8 @@ async def on_message(message: discord.Message):
|
|||
message_as_command = message.content.split(" ")
|
||||
|
||||
command = message_as_command[0]
|
||||
if command in GIF_COMMANDS:
|
||||
await gif_handler(message, message_as_command)
|
||||
if command in COMMANDS:
|
||||
await command_handler(message, message_as_command)
|
||||
|
||||
|
||||
client.run(open("token").read())
|
||||
|
|
Loading…
Reference in a new issue