import discord
import random
@_bot.command()
async def findnewbot(ctx):
bots = [u for u in _bot.users if u.bot and u not in ctx.guild.members]
bot = random.choice(bots)
await ctx.send(f"{bot} choiced from {len(bots)} bots.", embed=discord.Embed(
title="Bot Invite Link (permission 0)",
description=discord.utils.oauth_url(bot.id, guild=ctx.guild)
))
時間がないので一旦メモ。