Skip to content

Commit

Permalink
v0.3.0-beta
Browse files Browse the repository at this point in the history
Merge pull request #26 from Hamziee/dev
  • Loading branch information
Hamziee authored May 27, 2024
2 parents 8892142 + 3094234 commit 4dadc9e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 34 deletions.
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ The following versions will receive security updates as needed:

| Version | Supported |
| ------------ | ------------------ |
| 0.2.9-beta | :white_check_mark: |
| < 0.2.9-beta | :x: |
| 0.3.0-beta | :white_check_mark: |
| < 0.3.0-beta | :x: |

## Reporting a Vulnerability

Expand Down
30 changes: 0 additions & 30 deletions commands/emojis.py

This file was deleted.

34 changes: 34 additions & 0 deletions commands/hug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import discord
from discord.ext import commands
from discord import app_commands
import httpx
from datetime import datetime
import config

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

@app_commands.command(name="hug", description="Hug your (imaginary) friend/lover!")
@app_commands.rename(member='person')
async def hug(self, interaction: discord.Interaction, member: discord.Member):
try:
async with httpx.AsyncClient() as client:
response = await client.get("https://api.hamzie.site/v1/gifs/hug")
response.raise_for_status()
data = response.json()
image_url = data["link"]
embed = discord.Embed(
color=discord.Colour.blurple()
)
embed.set_image(url=image_url)
embed.set_footer(text=f"Ava | version: {config.AVA_VERSION} - Image by: api.hamzie.site", icon_url="https://cdn.discordapp.com/avatars/1209925239652356147/38e76bc9070eb00f2493b6edeab22b33.webp")

await interaction.response.send_message(content= f"{interaction.user.mention} hugs {member.mention}", embed=embed)
except httpx.HTTPError as http_err:
print(f'HTTP error occurred: {http_err}')
except Exception as err:
print(f'An error occurred: {err}')

async def setup(client:commands.Bot) -> None:
await client.add_cog(hug(client))
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.2.9-beta' # Do not change this, it will help with troubleshooting later
AVA_VERSION='v0.3.0-beta' # Do not change this, it will help with troubleshooting later

# Required Bot Configuration

Expand Down
1 change: 0 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Introducing Ava, the versatile and open-source Discord bot designed to serve all
## Features
- **Versatile**: Ava offers a wide range of features to cater to all your Discord server needs.
- **Open-Source**: Built on Python with discord.py, Ava's source code is open for contributions and customization.
- **Moderation Tools**: Keep your server in check with Ava's comprehensive moderation tools.
- **Fun Utilities**: Engage your community with fun and interactive utilities provided by Ava.

## Setup
Expand Down

0 comments on commit 4dadc9e

Please sign in to comment.