我一直在尝试制作一个discord bot,它将删除discord服务器邀请,但我不知道如何制作,以便bot知道链接是什么,这是我迄今为止尝试的:
import discord
from discord.ext import commands
client = commands.Bot(command_prefix = "https://discord.") #This along with the 'def gg' is trying to specify a discord invite
@client.event
async def on_ready():
print('Its working')
@client.command()
async def gg(ctx):
#I need this to find out if it is a link
client.run('(Token)')
如果你有一个更有效的解决方案,我很乐意阅读
如果使用^{} 事件,则可以轻松找到服务器邀请链接。以这种方式使用bot前缀不是一种好的方法。另外,请注意,即使是超链接,discord仍将嵌入邀请,因此
discord.gg/invite_code
仍将显示嵌入,即使discord不会将其标记为超链接相关问题 更多 >
编程相关推荐