-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathbasic_commands.py
54 lines (41 loc) · 1.3 KB
/
basic_commands.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
42
43
44
45
46
47
48
49
50
51
52
53
54
import random
import settings
import discord
from discord.ext import commands
logger = settings.logging.getLogger("bot")
def run():
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix="!", intents=intents)
@bot.event
async def on_ready():
logger.info(f"User: {bot.user} (ID: {bot.user.id})")
@bot.command(
aliases=['p'],
help="This is help",
description="This is description",
brief = "This is brief",
enabled=True,
hidden=True
)
async def ping(ctx):
""" Answers with pong """
await ctx.send("pong")
@bot.command()
async def say(ctx, what = "WHAT?"):
await ctx.send(what)
@bot.command()
async def say2(ctx, *what):
await ctx.send(" ".join(what))
@bot.command()
async def choices(ctx, *options):
await ctx.send(random.choice(options))
@bot.command()
async def add(ctx, one : int , two : int ):
await ctx.send(one + two)
@bot.command()
async def say3(ctx, what = "WHAT?", why = "WHY?"):
await ctx.send(what + why)
bot.run(settings.DISCORD_API_SECRET, root_logger=True)
if __name__ == "__main__":
run()