친구들과 디스코드에서 화상대화를 하던중 음성채널에 친구들이 들어왔을때 알람을 받고 싶었다.
import discord
from discord.ext import commands
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='#',intents=discord.Intents.all())
@bot.event
async def on_ready():
print(f'Login bot: {bot.user}')
# @bot.event
# async def on_ready():
@bot.command("마")
async def hello(message):
await message.channel.send('어어 왔나')
@bot.command("입장")
async def join(ctx):
if ctx.author.voice and ctx.author.voice.channel:
channel = ctx.author.voice.channel
await channel.connect()
else:
await ctx.send("음성 채널이 존재하지 않습니다.")
bot.run('MTE2ODQ1OTEwNTk1NDk2NzYwNQ.GHDBjp.xoXzbgGCCFf0oWtD8nQH1vuwB_Ua2-FSGoigZg')
<현재 봇 생성과 음성채팅입장 기능 까지 구현>
git@github.com:jmk445/discord_notifier_bot.git