-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
37 lines (25 loc) · 1.05 KB
/
main.py
File metadata and controls
37 lines (25 loc) · 1.05 KB
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
import discord
from discord.ext import commands
import os # default module
from dotenv import load_dotenv
intents = discord.Intents.default()
intents.message_content = True
load_dotenv() # load all the variables from the env file
bot = commands.Bot(command_prefix="s,", intents=intents)
@bot.event
async def on_ready():
print(f"{bot.user} is ready and online!")
@bot.slash_command(name="hello", description="Say hello to the bot")
async def hello(ctx: discord.ApplicationContext):
await ctx.respond("Hey!")
@bot.slash_command(name="contact", description="Contact Novi Engineering Club")
async def contact(ctx: discord.ApplicationContext):
await ctx.respond("Insta: @noviengineeringig \n Email: noviengineeringig@gmail.com")
@bot.slash_command(name="website", description="Novi Engineering Club website")
async def contact(ctx: discord.ApplicationContext):
await ctx.respond("https://noviengineering.club/")
# Load cogs
cogs_list = ["fun", "admin"]
for cog in cogs_list:
bot.load_extension(f"cogs.{cog}")
bot.run(os.getenv("DISCORD_TOKEN"))