lines: Added custom line support

This commit is contained in:
Sugaryy_ 2023-02-24 19:56:51 +01:00 committed by Yuki Joou
parent 2d30824ec3
commit 00bb477ca2
2 changed files with 55 additions and 3 deletions

44
lines.json Normal file
View file

@ -0,0 +1,44 @@
{
"hug": [
"$1 hugs $2. Cutee~ ",
"$1 hugs $2 tightly.",
"$2 got hugged by $1! :3"
],
"cuddle": [
"$1 cuddles $2 :3",
"$1 cuddles $2 tightly."
],
"hold": [
"$1 holds $2's hand, lewd :3",
"$1 holds $2's hand, cuteee!~",
"$1 holds $2's hand tightly."
],
"pat": [
"$1 gave $2 headpats :3",
"$2 got headpats from $1 :3"
],
"kiss": [
"$1 Kissed $2!~",
"$1 Kissed $2... >~<"
],
"fuck": [
"$1 does lewd stuff to $2. Oh my..."
],
"wag": [
"$2's Tail is wagging~ Cute!~",
"$2 wags their tail :3"
],
"lewd": [
"$1 says this is too lewd!~",
"$1, close your eyes!"
],
"boop": [
"$1 boops $2!~",
"$1 booped $2!~ Cutee!~",
"$1 booped $2 Nyaaa!~"
],
"blush": [
"$2's blushing!~ Cutieeee~",
"$2's blushing~ How cute~"
]
}

12
main.py
View file

@ -13,7 +13,11 @@ gifs = {}
with open("gifs.json") as file: with open("gifs.json") as file:
gifs = json.load(file) gifs = json.load(file)
HELP_MESSAGE= """ lines = {}
with open("lines.json") as file:
lines = json.load(file)
HELP_MESSAGE = """
Commands: Commands:
```hug - Hugs target user ```hug - Hugs target user
kiss - Kisses target user kiss - Kisses target user
@ -35,6 +39,7 @@ async def command_handler(message: discord.Message, command: list[str]):
command_typed = command[0] command_typed = command[0]
target = message.author.name target = message.author.name
sender = message.author.name
if len(message.mentions) > 0: if len(message.mentions) > 0:
target = message.mentions[0].name target = message.mentions[0].name
@ -48,7 +53,10 @@ async def command_handler(message: discord.Message, command: list[str]):
return return
choosen_gif = random.choice(gifs[command_typed]) choosen_gif = random.choice(gifs[command_typed])
await message.reply(f"here u go {target}\n{choosen_gif}") choosen_line = random.choice(lines[command_typed])
choosen_line = choosen_line.replace("$1", sender)
choosen_line = choosen_line.replace("$2", target)
await message.reply(f"{choosen_line}\n{choosen_gif}")
COMMANDS = [ COMMANDS = [
"hug", "hug",