Skip to content

Commit 7484026

Browse files
authored
2024-05-24
1 parent 2996939 commit 7484026

File tree

7 files changed

+43
-4
lines changed

7 files changed

+43
-4
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-
- Adjusted the base code lines for the bot.
19-
- Recreated the first "command" again.
20-
- Yume is now using .txt files to store texts that won't be localised.
18+
- Changed the organization of folders and files.
19+
- All GitHub related commands are now meshed into one single command.
20+
- Embeds and Buttons now have their own separated files.
2121

2222
## Have a suggestion?
2323
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!
705 Bytes
Binary file not shown.

cogs/dreams.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Bibliotecas utilizadas neste arquivo
2+
from utils import embeds, buttons
23
from discord.ext import commands
34
from discord import app_commands
45
import discord
@@ -15,12 +16,19 @@ def __init__(self, yume: commands.AutoShardedBot):
1516
async def on_ready(self):
1617
print('Yume is currently dreaming....')
1718

18-
# verify
19+
# Verify
1920
@app_commands.command(name='status', description="Check if everything is fine with me...")
2021
async def verify(self, interaction: discord.Interaction):
2122

2223
await interaction.response.send_message('Everything seems fine~', ephemeral=True)
2324

25+
# GitHub Information
26+
@app_commands.command(name='github', description="If you want to see my source code for some reason~")
27+
async def repository(self, interaction: discord.Interaction):
28+
29+
await interaction.response.send_message(embed=embeds.GitEmbed.git_embed, view=buttons.GitButtons.view,
30+
ephemeral=True)
31+
2432

2533
# Realiza o registro da classe nos cogs
2634
async def setup(yume: commands.AutoShardedBot) -> None:
1.13 KB
Binary file not shown.
1011 Bytes
Binary file not shown.

utils/buttons.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Bibliotecas Utilizadas
2+
from discord.ui import Button, View
3+
import discord
4+
5+
6+
class GitButtons:
7+
repo_button = Button(label="Repository", url='https://github.com/AkkoS2/Yume',
8+
style=discord.ButtonStyle.link, emoji='<:github:1243404130651865098>')
9+
10+
issue_button = Button(label="Open Issue", url='https://github.com/AkkoS2/Yume/issues',
11+
style=discord.ButtonStyle.link, emoji='<:github:1243404130651865098>')
12+
13+
commands_button = Button(label="Planned Commands", url='https://github.com/users/AkkoS2/projects/12',
14+
style=discord.ButtonStyle.link, emoji='<:github:1243404130651865098>')
15+
16+
view = View()
17+
view.add_item(repo_button)
18+
view.add_item(issue_button)
19+
view.add_item(commands_button)

utils/embeds.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Bibliotecas Utilizadas
2+
import discord
3+
4+
5+
class GitEmbed:
6+
7+
git_embed = discord.Embed(description='You can use the buttons located at the bottom of the embed to choose what '
8+
'you want to see about me~', color=discord.Color.fuchsia())
9+
git_embed.set_author(name="Yume's GitHub Info.")
10+
git_embed.set_image(url="https://cdn.discordapp.com/avatars/944414497966264321/20feb089532248f4665cea9b10b61d81."
11+
"png?size=4096")
12+
git_embed.set_footer(text="Yes, it's AI generated, please don't mind it.")

0 commit comments

Comments
 (0)