Skip to content

Commit

Permalink
Merge pull request #43 from Hamziee/dev
Browse files Browse the repository at this point in the history
v0.9.0-beta
  • Loading branch information
Hamziee authored Nov 18, 2024
2 parents e042cd5 + daf8344 commit e879cf7
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 2 deletions.
39 changes: 39 additions & 0 deletions commands/fun.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import discord
from discord.ext import commands
from discord import app_commands
import random
import config

class Fun(commands.Cog):
def __init__(self, client: commands.Bot):
self.client = client

@app_commands.command(name="ball", description="Get the truth of your question.")
async def ball(self, interaction: discord.Interaction, question: str):
try:
responses = [
"Yes, definitely!",
"No, absolutely not.",
"Ask again later.",
"It is certain.",
"I wouldn't count on it.",
"Most likely.",
"Outlook not so good.",
"Better not tell you now.",
"Yes!",
"My sources say no."
]
answer = random.choice(responses)
embed = discord.Embed(
color=discord.Colour.blurple(),
title=f"🎱 Question: {question}",
description=f"**Answer:** {answer}"
)
embed.set_footer(text=f"Ava | version: {config.AVA_VERSION}", icon_url=config.FOOTER_ICON)
await interaction.response.send_message(embed=embed)
except Exception as e:
print(e)
await interaction.followup.send(content='An error occurred.')

async def setup(client: commands.Bot) -> None:
await client.add_cog(Fun(client))
2 changes: 2 additions & 0 deletions commands/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ async def fun_button(self, interaction: discord.Interaction, button: discord.ui.
title="Ava | Enjoyable Commands",
description="Here is some information about my commands :)")
embed.add_field(name='/chat', value='Chat with my AI!', inline=False)
embed.add_field(name='/groupchat', value='Chat with my AI, using the context of the channel!', inline=False)
embed.add_field(name='/hug', value='Hug your friend/lover!', inline=False)
embed.add_field(name='/kiss', value='Kiss your friend/lover!', inline=False)
embed.add_field(name='/headpats', value='Give headpats to your friend/lover!', inline=False)
embed.add_field(name='/cats', value='Get your daily dose of cat pictures!', inline=False)
embed.add_field(name='/xiaojie', value='Get your daily dose of xiaojie cat pictures!', inline=False)
embed.add_field(name='/dogs', value='Get your daily dose of dog pictures!', inline=False)
embed.add_field(name='/8ball', value='Get the truth of your question.', inline=False)
embed.set_footer(text=f"Ava | version: {AVA_VERSION}", icon_url=config.FOOTER_ICON)
await interaction.response.defer()
await interaction.edit_original_response(embed=embed, view=Buttons())
Expand Down
6 changes: 6 additions & 0 deletions commands/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import itertools
import math
import random
import config

import discord
import yt_dlp as youtube_dl
Expand Down Expand Up @@ -399,6 +400,11 @@ async def _skip(self, ctx: commands.Context):
if voter == ctx.voice_state.current.requester:
await ctx.message.add_reaction('⏭')
ctx.voice_state.skip()

elif voter == config.OWNER_ID:
await ctx.message.add_reaction('⏬')
await ctx.send('Master skip vote, skipping.')
ctx.voice_state.skip()

elif voter.id not in ctx.voice_state.skip_votes:
ctx.voice_state.skip_votes.add(voter.id)
Expand Down
2 changes: 1 addition & 1 deletion ex_config (change me to config.py).py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AVA_VERSION = 'v0.8.2-beta' # Do not change this, it will help with troubleshooting later
AVA_VERSION = 'v0.9.0-beta' # Do not change this, it will help with troubleshooting later
CONFIG_VERSION = 3 # Do not change this, it will help with troubleshooting later

# Required Bot Configuration
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ async-timeout==5.0.1
yt_dlp==2024.11.18
cogwatch==3.3.1
httpx==0.27.2
setuptools==75.5.0
requests==2.32.3

0 comments on commit e879cf7

Please sign in to comment.