-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
41 lines (30 loc) · 801 Bytes
/
bot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import os
import nextcord
from dotenv import load_dotenv
from nextcord.ext import commands
bot = commands.Bot(command_prefix="-")
@bot.event
async def on_ready():
await bot.change_presence(
activity=nextcord.Activity(
type=nextcord.ActivityType.playing, name="-h for help"
)
)
print("Bot is online.")
@bot.command()
async def h(ctx):
msg = """
```
-------------------------------------
-h help command
-ping ping to get a pong
-------------------------------------
```
"""
em = nextcord.Embed(title="Help", description=msg, color=0xFF0000) # hex for red
await ctx.send(embed=em)
@bot.command()
async def ping(ctx):
await ctx.send("pong!")
load_dotenv()
bot.run(os.getenv("TOKEN"))