Skip to content

Commit

Permalink
Update Activity.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGinocchio committed Dec 21, 2024
1 parent 47ba563 commit e5a4486
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions src/commands/activity/Activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

class Activity(commands.Cog):
def __init__(self, bot : commands.Bot):
self.names = {
self.states = {
'/help' : "Use /help to see all available commands.",
'/ask' : "Use /ask to ask a question and get an answer from GGsBot AI.",
'/chat' : "Use /chat to chat with GGsBot AI.",
Expand All @@ -42,7 +42,7 @@ def __init__(self, bot : commands.Bot):
'/translate' : "Use /translate to translate a text from one language to another.",
'/summarize' : "Use /summarize to summarize a text with GGsBot AI."
}
self.commands = list(self.names.keys())
self.commands = list(self.states.keys())
self.command : str = None
self.bot = bot

Expand All @@ -55,23 +55,9 @@ async def on_ready(self):
async def update_activity(self):
try:
activity = nextcord.Activity(
type=ActivityType.playing,
type=nextcord.ActivityType.playing,
name=(name:=random.choice([n for n in self.commands if n != self.command] if self.command else self.commands)),
state=self.names[name],
details="testing",
url="https://github.com/GitGinocchio/GGsBot",
assets={
"large_image": "https://github.com/GitGinocchio/GGsBot/blob/main/docs/media/banner.png?raw=true",
"large_text": "GGsBot",
"small_image": "https://github.com/GitGinocchio/GGsBot/blob/main/docs/media/circular_icon.png?raw=true",
"small_text": "GGsBot"
},
buttons=[
{ "label" : "GitHub Repository", "url" : "https://github.com/GitGinocchio/GGsBot" },
{ "label" : "Developer", "url" : "https://github.com/GitGinocchio" }
],
timestamps = { "start": int(time.time())}
state=self.states[name]
)

self.command = name
Expand Down

0 comments on commit e5a4486

Please sign in to comment.