📜  DiscordUtils - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:43.534000             🧑  作者: Mango

代码示例1
import discord
from discord.ext import commands
import DiscordUtils

intents = discord.intents.default()
intents.members = True
bot = commands.AutoShardedBot(command_prefix=">", intents=intents)
tracker = DiscordUtils.InviteTracker(bot)

@bot.event
async def on_member_join(member):
    inviter = await tracker.fetch_inviter(member) # inviter is the member who invited