from discord.ext import commands
class Invite(commands.Cog, name="Invite"):
def __init__(self, bot):
self.bot = bot
@commands.command(aliases = ['inv', 'support'])
async def invite(self, ctx):
view = discord.ui.View()
#https://discord.com/api/oauth2/authorize?client_id=1004992609565036645&permissions=8&scope=bot
embed = discord.Embed(color=0x303135, description = '>_<')
embed.set_author(icon_url=self.bot.user.avatar.url, name='cope')
view.add_item(discord.ui.Button(label='invite', url='https://discord.com/api/oauth2/authorize?client_id=1004992609565036645&permissions=8&scope=bot', style=discord.ButtonStyle.url))
view.add_item(discord.ui.Button(label='support', url='https.gg/kissed', style=discord.ButtonStyle.url))
await ctx.send(embed=embed, view=view)
@commands.command(aliases=['mc', 'members'])
async def membercount(self, ctx):
total = len(ctx.guild.members)
bots = len(list(filter(lambda m: m.bot, ctx.guild.members)))
mems = sum(not m.bot for m in ctx.guild.members)
embed = discord.Embed( description = f"**Users**\n{total}\n**Humans**\n{mems}\n**Bots**\n{bots}", color = 0x303135)
embed.set_author(name=f"{ctx.guild.name}", icon_url=f"{ctx.guild.icon.url}")
await ctx.message.reply(embed=embed, mention_author=False)
@commands.command(aliases=["creds","credit"])
async def credits(self, ctx):
embed = discord.Embed(description = "> **har#0001** `&` **sent#0001**",color =0x303135)
embed.set_author(name=f'{ctx.author}', icon_url=f'{ctx.author.avatar.url}')
embed.set_footer(text='use ;botinfo for more info on devs')
await ctx.send(embed=embed)
@commands.command()
async def botinfo(self, ctx):
embed = discord.Embed(
title = '**cope info**:',
description = f'[__inv__]( https://discord.com/api/oauth2/authorize?client_id={self.bot.user.id}&permissions=8&scope=bot) : [__support__](https:///kissed)\n\n**Guilds**: {len(self.bot.guilds)}\n**Members**: {len(self.bot.users)}\n**Lang**: Pycord\n**Commands**: {len(self.bot.commands)}\n**Devs**: har#0001',
color = 0x303135
)
embed.set_thumbnail(url=f'{self.bot.user.avatar.url}')
await ctx.send(embed=embed)
def setup(bot):
bot.add_cog(Invite(bot))``` ```discord.errors.NoEntryPointError: Extension 'cogs.invite' has no 'setup' function.```