заготовка бота
This commit is contained in:
parent
00f9a3892a
commit
f3b623538b
18
hlna_discord_bot.py
Normal file
18
hlna_discord_bot.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import discord
|
||||||
|
from discord.ext import commands
|
||||||
|
|
||||||
|
config = {
|
||||||
|
'token': 'your-token',
|
||||||
|
'prefix': 'prefix',
|
||||||
|
}
|
||||||
|
|
||||||
|
bot = commands.Bot(command_prefix=config['prefix'])
|
||||||
|
|
||||||
|
|
||||||
|
@bot.event
|
||||||
|
async def on_message(ctx):
|
||||||
|
if ctx.author != bot.user:
|
||||||
|
await ctx.reply(ctx.content)
|
||||||
|
|
||||||
|
bot.run(config['token'])
|
Loading…
Reference in New Issue
Block a user