Skip to content

Commit 4341c72

Browse files
authored
2024-09-29
Yume: Pings & Names Update
1 parent 9d53f89 commit 4341c72

18 files changed

+86
-47
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ You are 100% allowed to have a self-hosted version of Yume under the following c
1515
Soon™ (I'm still planning it)
1616

1717
## Changelog
18-
- Cats, Dogs 3 & Knuckles.
19-
- A currency converter comamand.
20-
- removed some of the useless imports.
18+
- It's possible to ping users when using the Roleplay commands.
19+
- Fixed my dumbest mistake so far.
20+
- Fixed weird typos.
2121
## Have a suggestion?
2222
If you have any suggestions or ideas for new commands, you can tell them to me and I will analyze then carefully. Thanks for the attention!
2323

1.91 KB
Binary file not shown.
877 Bytes
Binary file not shown.

cogs/__pycache__/fun.cpython-312.pyc

1.26 KB
Binary file not shown.
8.45 KB
Binary file not shown.
16.2 KB
Binary file not shown.
997 Bytes
Binary file not shown.

cogs/actions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async def on_ready(self):
2020
@app_commands.command(name='smug', description='Show your smugness~')
2121
async def smug(self, interaction: discord.Interaction):
2222

23-
await interaction.response.send_message("Action commands are currently being reworked :c")
23+
await interaction.response.send_message("Action commands are currently being reworked :c", view=view)
2424

2525
# Party
2626

cogs/roleplay.py

+43-22
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# bibliotecas
22
from utils.embeds import GenericEmbed
3+
from utils import helpers, buttons
34
from discord.ext import commands
45
from discord import app_commands
5-
from utils import helpers
66
import discord
77

88

@@ -22,150 +22,171 @@ async def on_ready(self):
2222
async def hug(self, interaction: discord.Interaction, *, user: discord.Member):
2323

2424
helpers.nekos_gif = 'hug'
25+
view = buttons.PingButton()
26+
buttons.pinged_one = user.mention
27+
2528
GenericEmbed.embed.set_image(url=str(await helpers.nekos_best()))
2629
GenericEmbed.embed.set_footer(text='Just lovely!!!')
2730

2831
if user == interaction.user:
29-
GenericEmbed.embed.set_author("Feeling Lonely? Come here, Yume is gonna hug you~ ❤️")
32+
GenericEmbed.embed.set_author(name="Feeling Lonely? Come here, Yume is gonna hug you~ ❤️")
3033
await interaction.response.send_message(embed=GenericEmbed.embed)
3134

3235
GenericEmbed.embed.set_author(name=f"{interaction.user.display_name} just hugged {user.display_name}!")
33-
await interaction.response.send_message(embed=GenericEmbed.embed)
36+
await interaction.response.send_message(embed=GenericEmbed.embed, view=view)
3437

3538
# slap
3639
@app_commands.command(name='slap', description='Slaps someone')
3740
async def slap(self, interaction: discord.Interaction, *, user: discord.Member):
3841

3942
helpers.nekos_gif = 'slap'
43+
view = buttons.PingButton()
44+
4045
GenericEmbed.embed.set_image(url=str(await helpers.nekos_best()))
41-
GenericEmbed.embed.set_footer(text='That was funny to watch... hehe~')
46+
GenericEmbed.embed.set_footer(text='That was funny... hehe~')
4247

4348
if user == interaction.user:
44-
GenericEmbed.embed.set_author("If you insist... i'm so sorry...")
49+
GenericEmbed.embed.set_author(name="If you insist... i'm so sorry...")
4550
await interaction.response.send_message(embed=GenericEmbed.embed)
4651

4752
GenericEmbed.embed.set_author(name=f"{interaction.user.display_name} slapped {user.display_name}! I wonder what happened...")
48-
await interaction.response.send_message(embed=GenericEmbed.embed)
53+
await interaction.response.send_message(embed=GenericEmbed.embed, view=view)
4954

5055
# kiss
5156
@app_commands.command(name='kiss', description='Kisses someone.')
5257
async def kiss(self, interaction: discord.Interaction, *, user: discord.Member):
5358

5459
helpers.nekos_gif = 'kiss'
60+
view = buttons.PingButton()
61+
5562
GenericEmbed.embed.set_image(url=str(await helpers.nekos_best()))
5663
GenericEmbed.embed.set_footer(text='It was really cute!')
5764

5865
if user == interaction.user:
59-
GenericEmbed.embed.set_author("Awwnn... Come here, Yume is gonna give you a kiss!")
66+
GenericEmbed.embed.set_author(name="Awwnn... Come here, Yume is gonna give you a kiss!")
6067
await interaction.response.send_message(embed=GenericEmbed.embed)
6168

6269
GenericEmbed.embed.set_author(name=f"{interaction.user.display_name} just kissed {user.display_name}! In front of everyone!")
63-
await interaction.response.send_message(embed=GenericEmbed.embed)
70+
await interaction.response.send_message(embed=GenericEmbed.embed, view=view)
6471

6572
# pat
6673
@app_commands.command(name='pat', description='You can pat someone')
6774
async def pat(self, interaction: discord.Interaction, *, user: discord.Member):
6875

6976
helpers.nekos_gif = 'pat'
77+
view = buttons.PingButton()
78+
7079
GenericEmbed.embed.set_image(url=str(await helpers.nekos_best()))
7180
GenericEmbed.embed.set_footer(text='Everyone should receive a little pat!')
7281

7382
if user == interaction.user:
74-
GenericEmbed.embed.set_author("Seems that you are lonely... I'm gonna pat you, don't worry!")
83+
GenericEmbed.embed.set_author(name="Seems that you are lonely... I'm gonna pat you, don't worry!")
7584
await interaction.response.send_message(embed=GenericEmbed.embed)
7685

7786
GenericEmbed.embed.set_author(name=f"{interaction.user.display_name} is patting {user.display_name}! ❤️")
78-
await interaction.response.send_message(embed=GenericEmbed.embed)
87+
await interaction.response.send_message(embed=GenericEmbed.embed, view=view)
7988

8089
# bite
8190
@app_commands.command(name='bite', description='Bites someone, just make sure to not hurt them')
8291
async def bite(self, interaction: discord.Interaction, *, user: discord.Member):
8392

8493
helpers.nekos_gif = 'bite'
94+
view = buttons.PingButton()
95+
8596
GenericEmbed.embed.set_image(url=str(await helpers.nekos_best()))
8697
GenericEmbed.embed.set_footer(text='Does it hurt? Maybe it was too strong?')
8798

8899
if user == interaction.user:
89-
GenericEmbed.embed.set_author("I'm gonna bite you then.... Kinda chewy.....")
100+
GenericEmbed.embed.set_author(name="I'm gonna bite you then.... Kinda chewy.....")
90101
await interaction.response.send_message(embed=GenericEmbed.embed)
91102

92103
GenericEmbed.embed.set_author(name=f"{interaction.user.display_name} is biting {user.display_name}, why??")
93-
await interaction.response.send_message(embed=GenericEmbed.embed)
104+
await interaction.response.send_message(embed=GenericEmbed.embed, view=view)
94105

95106
# stare
96107
@app_commands.command(name='stare', description='Just... stare at someone for no reason')
97108
async def stare(self, interaction: discord.Interaction, *, user: discord.Member):
98109

99110
helpers.nekos_gif = 'stare'
111+
view = buttons.PingButton()
112+
100113
GenericEmbed.embed.set_image(url=str(await helpers.nekos_best()))
101114
GenericEmbed.embed.set_footer(text='Be careful not to stare for too long - they might notice!')
102115

103116
if user == interaction.user:
104-
GenericEmbed.embed.set_author("I'm gonna stare at you then... please don't look away!")
117+
GenericEmbed.embed.set_author(name="I'm gonna stare at you then... please don't look away!")
105118
await interaction.response.send_message(embed=GenericEmbed.embed)
106119

107120
GenericEmbed.embed.set_author(name=f"{interaction.user.display_name} is staring at {user.display_name}.....")
108-
await interaction.response.send_message(embed=GenericEmbed.embed)
121+
await interaction.response.send_message(embed=GenericEmbed.embed, view=view)
109122

110123
# shoot
111124
@app_commands.command(name='shoot', description='Shoots a user, careful to not kill them')
112125
async def shoot(self, interaction: discord.Interaction, *, user: discord.Member):
113126

114127
helpers.nekos_gif = 'shoot'
128+
view = buttons.PingButton()
129+
115130
GenericEmbed.embed.set_image(url=str(await helpers.nekos_best()))
116131
GenericEmbed.embed.set_footer(text="Oh my God, are you okay? I'm calling an ambulance, stay strong, please!")
117132

118133
if user == interaction.user:
119-
GenericEmbed.embed.set_author("Suuuree.... hehe~")
134+
GenericEmbed.embed.set_author(name="Suuuree.... hehe~")
120135
await interaction.response.send_message(embed=GenericEmbed.embed)
121136

122137
GenericEmbed.embed.set_author(name=f"{user.display_name} just got shot by {interaction.user.display_name}!!! Should we call the police?")
123-
await interaction.response.send_message(embed=GenericEmbed.embed)
138+
await interaction.response.send_message(embed=GenericEmbed.embed, view=view)
124139

125140
# punch
126141
@app_commands.command(name='punch', description='Punches someone!')
127142
async def punch(self, interaction: discord.Interaction, *, user: discord.Member):
128143

129144
helpers.nekos_gif = 'punch'
145+
view = buttons.PingButton()
146+
130147
GenericEmbed.embed.set_image(url=str(await helpers.nekos_best()))
131148
GenericEmbed.embed.set_footer(text='That actually might have been painful, I guess?')
132149

133150
if user == interaction.user:
134-
GenericEmbed.embed.set_author("I usually don't like punching people, but since you asked so nicely~")
151+
GenericEmbed.embed.set_author(name="I usually don't like punching people, but since you asked so nicely~")
135152
await interaction.response.send_message(embed=GenericEmbed.embed)
136153

137154
GenericEmbed.embed.set_author(name=f"{interaction.user.display_name} punched {user.display_name}, how strong was it..?")
138-
await interaction.response.send_message(embed=GenericEmbed.embed)
155+
await interaction.response.send_message(embed=GenericEmbed.embed, view=view)
139156

140157
# poke
141158
@app_commands.command(name='poke', description='Pokes another user, if you want to')
142159
async def poke(self, interaction: discord.Interaction, *, user: discord.Member):
143160

144161
helpers.nekos_gif = 'poke'
162+
view = buttons.PingButton()
163+
145164
GenericEmbed.embed.set_image(url=str(await helpers.nekos_best()))
146165
GenericEmbed.embed.set_footer(text='Is it annoying to keep poking people?')
147166

148167
if user == interaction.user:
149-
GenericEmbed.embed.set_author("Yume likes poking others, come here!!!")
168+
GenericEmbed.embed.set_author(name="Yume likes poking others, come here!!!")
150169
await interaction.response.send_message(embed=GenericEmbed.embed)
151170

152171
GenericEmbed.embed.set_author(name=f"{interaction.user.display_name} is poking {user.display_name}. I want to poke them too!")
153-
await interaction.response.send_message(embed=GenericEmbed.embed)
172+
await interaction.response.send_message(embed=GenericEmbed.embed, view=view)
154173

155174
# cuddle
156175
@app_commands.command(name='cuddle', description='Stop being annoying, cuddle with someone instead')
157176
async def cuddle(self, interaction: discord.Interaction, *, user: discord.Member):
158177

159178
helpers.nekos_gif = 'cuddle'
179+
view = buttons.PingButton()
180+
160181
GenericEmbed.embed.set_image(url=str(await helpers.nekos_best()))
161182
GenericEmbed.embed.set_footer(text="That's the sweetest thing i've seen~")
162183

163184
if user == interaction.user:
164-
GenericEmbed.embed.set_author("Seems like you are always lonely, huh? Come here, cutie!")
185+
GenericEmbed.embed.set_author(name="Seems like you are always lonely, huh? Come here, cutie!")
165186
await interaction.response.send_message(embed=GenericEmbed.embed)
166187

167188
GenericEmbed.embed.set_author(name=f"{interaction.user.display_name} is cuddling with {user.display_name}, do not interrupt them!")
168-
await interaction.response.send_message(embed=GenericEmbed.embed)
189+
await interaction.response.send_message(embed=GenericEmbed.embed, view=view)
169190

170191
# lick
171192

status.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
playing with you~
2+
dreaming
3+
with dreams
4+
new commands
5+
commands new
6+
yume talks in third person sometimes
139 Bytes
Binary file not shown.
1.01 KB
Binary file not shown.
857 Bytes
Binary file not shown.
5.51 KB
Binary file not shown.
6 Bytes
Binary file not shown.
6.44 KB
Binary file not shown.

utils/buttons.py

+32-20
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
11
# Bibliotecas utilizadas neste arquivo
2-
from discord.ui import Button, View
2+
from discord.ext import commands
33
import discord
44

5-
smug_button = Button(label="Smug back", style=discord.ButtonStyle.blurple)
6-
stare_button = Button(label="Start staring", style=discord.ButtonStyle.blurple)
7-
party_button = Button(label="Join party", style=discord.ButtonStyle.blurple)
8-
leave_button = Button(label="Leave party", style=discord.ButtonStyle.blurple)
9-
respect_button = Button(label="Pay respects", style=discord.ButtonStyle.blurple)
10-
arrest_button = Button(label="Arrest them", style=discord.ButtonStyle.blurple)
11-
dance_button = Button(label="Dance together", style=discord.ButtonStyle.blurple)
12-
sigh_button = Button(label="Sigh...", style=discord.ButtonStyle.blurple)
13-
laugh_button = Button(label="Laugh back", style=discord.ButtonStyle.blurple)
14-
pout_button = Button(label="Pout too", style=discord.ButtonStyle.blurple)
15-
purr_button = Button(label="Act like a kitty too", style=discord.ButtonStyle.blurple)
16-
shrug_button = Button(label="Shrug back", style=discord.ButtonStyle.blurple)
17-
smile_button = Button(label="Smile too", style=discord.ButtonStyle.blurple)
18-
hmph_button = Button(label="Hmph!!!", style=discord.ButtonStyle.blurple)
19-
hug_button = Button(label="Comfort them", style=discord.ButtonStyle.blurple)
20-
shy_button = Button(label="I'm also blushy...", style=discord.ButtonStyle.blurple)
21-
bribe_button = Button(label="Try giving them a bribe", style=discord.ButtonStyle.blurple)
22-
sad_button = Button(label="So sad...", style=discord.ButtonStyle.blurple)
23-
wave_button = Button(label="Wave to them", style=discord.ButtonStyle.blurple)
5+
pinged_one = None
6+
7+
# smug_button = Button(label="Smug back", style=discord.ButtonStyle.blurple)
8+
# stare_button = Button(label="Start staring", style=discord.ButtonStyle.blurple)
9+
# party_button = Button(label="Join party", style=discord.ButtonStyle.blurple)
10+
# leave_button = Button(label="Leave party", style=discord.ButtonStyle.blurple)
11+
# respect_button = Button(label="Pay respects", style=discord.ButtonStyle.blurple)
12+
# arrest_button = Button(label="Arrest them", style=discord.ButtonStyle.blurple)
13+
# dance_button = Button(label="Dance together", style=discord.ButtonStyle.blurple)
14+
# sigh_button = Button(label="Sigh...", style=discord.ButtonStyle.blurple)
15+
# laugh_button = Button(label="Laugh back", style=discord.ButtonStyle.blurple)
16+
# pout_button = Button(label="Pout too", style=discord.ButtonStyle.blurple)
17+
# purr_button = Button(label="Act like a kitty too", style=discord.ButtonStyle.blurple)
18+
# shrug_button = Button(label="Shrug back", style=discord.ButtonStyle.blurple)
19+
# smile_button = Button(label="Smile too", style=discord.ButtonStyle.blurple)
20+
# hmph_button = Button(label="Hmph!!!", style=discord.ButtonStyle.blurple)
21+
# hug_button = Button(label="Comfort them", style=discord.ButtonStyle.blurple)
22+
# shy_button = Button(label="I'm also blushy...", style=discord.ButtonStyle.blurple)
23+
# bribe_button = Button(label="Try giving them a bribe", style=discord.ButtonStyle.blurple)
24+
# sad_button = Button(label="So sad...", style=discord.ButtonStyle.blurple)
25+
# wave_button = Button(label="Wave to them", style=discord.ButtonStyle.blurple)
26+
27+
28+
class PingButton(discord.ui.View):
29+
30+
@discord.ui.button(label="Ping user", style=discord.ButtonStyle.blurple)
31+
async def ping_btn(self, interaction: discord.Interaction, button: discord.ui.Button):
32+
33+
button.disabled = True
34+
await interaction.response.edit_message(view=self)
35+
await interaction.followup.send(pinged_one)

utils/helpers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async def currency_finder():
7979
# Cats and Dogs
8080
async def catdog():
8181

82-
if dogs_key == "thedogapi":
82+
if dogcat == "thedogapi":
8383
key = dogs_key()
8484
else:
8585
key = cats_key()

0 commit comments

Comments
 (0)