mirror of
https://github.com/NovaOSS/nova-cord.git
synced 2024-11-25 22:53:57 +01:00
Simple boilerplate
This commit is contained in:
parent
4011099201
commit
bbacc30c3d
14
.vscode/settings.json
vendored
Normal file
14
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"files.exclude": {
|
||||||
|
"**/.git": true,
|
||||||
|
"**/.svn": true,
|
||||||
|
"**/.hg": true,
|
||||||
|
"**/CVS": true,
|
||||||
|
"**/.DS_Store": true,
|
||||||
|
"**/Thumbs.db": true,
|
||||||
|
"**/__pycache__": true,
|
||||||
|
"**/.vscode": true,
|
||||||
|
"**/*.map": true
|
||||||
|
},
|
||||||
|
"hide-files.files": []
|
||||||
|
}
|
26
cord/bot.py
Normal file
26
cord/bot.py
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# This example requires the 'members' and 'message_content' privileged intents to function.
|
||||||
|
|
||||||
|
import os
|
||||||
|
import discord
|
||||||
|
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
from discord.ext import commands
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
|
|
||||||
|
intents = discord.Intents.default()
|
||||||
|
intents.members = True
|
||||||
|
intents.message_content = True
|
||||||
|
|
||||||
|
bot = commands.Bot(command_prefix='?', intents=intents)
|
||||||
|
|
||||||
|
@bot.event
|
||||||
|
async def on_ready():
|
||||||
|
print(f'Online as {bot.user} (ID: {bot.user.id})')
|
||||||
|
await bot.change_presence(activity=discord.Game(name='with fire'))
|
||||||
|
|
||||||
|
@bot.event
|
||||||
|
async def on_message(message):
|
||||||
|
await bot.process_commands(message)
|
||||||
|
|
||||||
|
bot.run(os.getenv('DISCORD_TOKEN'))
|
Loading…
Reference in a new issue