25 lines
533 B
Python
25 lines
533 B
Python
import discord
|
|
from discord.ext import commands
|
|
import logging
|
|
|
|
logging.basicConfig(level=logging.INFO)
|
|
logger = logging.getLogger(__name__)
|
|
|
|
intents = discord.Intents.default()
|
|
intents.messages = True
|
|
intents.guilds = True
|
|
intents.voice_states = True
|
|
intents.message_content = True
|
|
intents.reactions = True
|
|
bot = commands.Bot(command_prefix='!', intents=intents)
|
|
|
|
@bot.event
|
|
async def on_ready():
|
|
logger.info(f'{bot.user.name} がログインしました')
|
|
|
|
def run_bot(token):
|
|
bot.run(token)
|
|
|
|
def get_bot():
|
|
return bot
|