added on_join.py
This commit is contained in:
parent
42d698ffa5
commit
299d8e677f
1 changed files with 20 additions and 0 deletions
20
cogs/on_join.py
Normal file
20
cogs/on_join.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import logging
|
||||
import os
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
||||
|
||||
class OnJoin(commands.Cog):
|
||||
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
self.logger = logging.getLogger("bot")
|
||||
|
||||
@commands.Cog.listener()
|
||||
async def on_member_join(self, member: discord.Member):
|
||||
channel = self.bot.get_channel(346102473993355267)
|
||||
await channel.send(f"{member.mention} WHO??? :thinking_face:")
|
||||
self.logger.info(f"Member {member.name} joined")
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(OnJoin(bot))
|
||||
Loading…
Add table
Add a link
Reference in a new issue