Skip to content

Commit

Permalink
Merge branch 'main' into 11-add-more-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chanomkaimuk committed Aug 10, 2023
2 parents 2bd376a + d841ec7 commit 33e35c8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
from commands.edit_entry import edit_entry_cmd
from commands.one_o_one import one_o_one
from commands import hgs
from commands.shiba import random_shiba
import sys

# load environment vars (from .env)
load_dotenv()
prod = len(sys.argv) > 1 and sys.argv[1] == 'prod'
TOKEN = os.getenv('DISCORD_TOKEN_DEV' if not prod else 'DISCORD_TOKEN')
prod = len(sys.argv) > 1 and sys.argv[1] == "prod"
TOKEN = os.getenv("DISCORD_TOKEN_DEV" if not prod else "DISCORD_TOKEN")
GUILD = os.getenv("DISCORD_GUILD")

deployment_date = datetime.datetime.now()
Expand All @@ -43,6 +44,7 @@
async def test_slash_command(interaction: discord.Interaction):
await interaction.response.send_message("https://placetw.com/")


# * simple echo command with param explanation
@tree.command(
name="echo",
Expand All @@ -67,13 +69,15 @@ async def test_slash_command(interaction: discord.Interaction):
"""
await interaction.response.send_message(msg)


# * register commands from other files
fetch_entry_cmd.register_commands(tree, this_guild)
fetch_entry_ui.register_commands(tree, this_guild)
one_o_one.register_commands(tree, this_guild)
# edit_entry_modal.register_commands(tree, this_guild, client)
edit_entry_cmd.register_commands(tree, this_guild, client)
hgs.register_commands(tree, this_guild)
random_shiba.register_commands(tree, this_guild)


# sync the slash commands to server
Expand Down

0 comments on commit 33e35c8

Please sign in to comment.