discord

discord.py rewrite: TypeError: cogs must derive from Cog

笑着哭i 提交于 2021-01-27 07:09:01
问题 As my bot is getting bigger, I'm trying to implement cogs, however I have ran across a problem. I have my whole code set up and ready, but for some weird reason I keep getting this error: Traceback (most recent call last): File "C:\Users\Lauras\Desktop\Akagi Bot\main.py", line 107, in <module> bot.add_cog("cogs.fun") File "C:\Users\Lauras\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\ext\commands\bot.py", line 477, in add_cog raise TypeError('cogs must derive from Cog')

Find the total of members online/offline Discord.js

故事扮演 提交于 2021-01-24 13:26:20
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

Find the total of members online/offline Discord.js

倾然丶 夕夏残阳落幕 提交于 2021-01-24 13:22:14
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

Find the total of members online/offline Discord.js

做~自己de王妃 提交于 2021-01-24 13:22:08
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

Find the total of members online/offline Discord.js

微笑、不失礼 提交于 2021-01-24 13:21:53
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

Find the total of members online/offline Discord.js

扶醉桌前 提交于 2021-01-24 13:21:30
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

Find the total of members online/offline Discord.js

一世执手 提交于 2021-01-24 13:19:52
问题 Hello I am making a server state command and I do not know how to find the total members online/offline so if someone could help me that would be awesome. :) 回答1: client.on("message", message => { if (message.author.bot) return false; if (message.content.toLowerCase() == "stats") { const Embed = new discord.MessageEmbed(); Embed.setTitle(`Server Stats`) // Using Collection.filter() to separate the online members from the offline members. Embed.addField("Online Members", message.guild.members

How to make a canvas profile card in discord python bot?

有些话、适合烂在心里 提交于 2021-01-24 09:05:14
问题 I need help with discord.py. I've been creating a bot on python, so I wanted to make a canvas profile card with this bot. The problem is, I did not find anything in google about it, only node.js. I do not want to rewrite my bot and I'd like to make a profile card like example: juniperbot, mee6. Help me with it please! 回答1: I don't know jupiterbot nor mee6 but if canvas means Image manipulation with Canvas in documentation for discord.js then it is used only to generate image and simply send()

What it really is @client.event? discord.py

久未见 提交于 2021-01-21 09:12:30
问题 A few days ago I became interested in programming discord bots a bit. In the syntax of these programs I noticed a lot of unintelligible issues that I can not find an answer to. That's why I am asking you for help in understanding them. All questions are based on this code: import discord import asyncio from discord.ext import commands botToken = '***' client = commands.Bot(command_prefix = '.') @client.event async def on_ready(): print('Bot is ready!') @client.event async def on_message

Discord OAuth Code Usage

孤街浪徒 提交于 2021-01-21 08:26:06
问题 I'm interested in interfacing with Discord using the Discord API. I would describe their documentation as "sparse," but maybe I'm just not looking in the right places. Most of my information comes from this page: https://discordapp.com/developers/docs/topics/oauth2 I've already set up my Discord guild and application (and even a bot, which may be unnecessary). My specific plan to is to allow users to give my site permission to add them to a private Discord guild/server. I have a hyperlink on