Skip to content

Commit

Permalink
cleaned up bot.py a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
APandamonium1 committed Nov 13, 2023
1 parent 785613c commit bc5ac82
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ async def send_command_help(self, command):
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
logger.addHandler(handler)

# Define intents
# intents = discord.Intents.default()
# intents.members = True
# intents.message_content = True
# intents.typing = True
# intents.presences = False
# intents.guilds = True

# activity = discord.Activity(type=discord.ActivityType.watching, name="Byte®Hackz")
# client = discord.Client(intents=intents,
# activity=activity,
Expand All @@ -89,14 +81,6 @@ async def send_command_help(self, command):


@client.event
# async def on_ready():
# await tree.sync()
# print(f"Logged in as: {client.user}")
# print(f"Servers: {len(client.guilds)}")
# print(f"I am in: {[i.name for i in client.guilds]}")
# print("Bot is online.")


async def load():
for filename in os.listdir('./cogs'):
if filename.endswith('.py'):
Expand All @@ -113,7 +97,7 @@ async def goodbye(interaction: discord.Interaction, member:discord.Member):
await interaction.response.send_message(f"Goodbye {member.mention}, have a nice day!")


@tree.command(description="Sends the bot's latency.")
@tree.command(name="ping", description="Sends the bot's latency.")
async def ping(interaction: discord.Interaction):
await interaction.response.send_message(f"Pong! Latency is {client.latency}ms", ephemeral=True)

Expand Down Expand Up @@ -169,7 +153,7 @@ async def on_message(message):



@tree.command()
@tree.command(name="joke", description="This is a joke.")
async def joke(interaction: discord.Interaction):
jokeurl = "https://dad-jokes.p.rapidapi.com/random/joke"

Expand Down

0 comments on commit bc5ac82

Please sign in to comment.