discord

Discord JDA - Invalid Member List

拈花ヽ惹草 提交于 2020-05-16 19:10:27
问题 I am creating a Discord bot and have encountered a strange problem. I need to go through each user on the server and perform a conditional action. But when receiving a list of all Members, it contains only me and the bot itself. public class Bot extends ListenerAdapter { public void onGuildMessageReceived(GuildMessageReceivedEvent Event) { String Message = Event.getMessage().getContentRaw(); if(Message.charAt(0) == Globals.BOT_PREFIX) { String[] Args = Message.split("\\s+"); if(Args[0]

Discord.py Bot sending file to Discord Channel

若如初见. 提交于 2020-05-15 05:53:10
问题 I am trying to make my discord bot send a jpg file to my discord server, but I keep getting an error that seems pretty uncommon as I can not find any solutions to it on the internet... the error is... discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientRequestError: Can not write request body for https://discordapp.com/api/v6/channels/454374995758678029/messages My imports are import time import discord from discord.ext import commands from discord.ext.commands

Discord.py Bot sending file to Discord Channel

时间秒杀一切 提交于 2020-05-15 05:52:32
问题 I am trying to make my discord bot send a jpg file to my discord server, but I keep getting an error that seems pretty uncommon as I can not find any solutions to it on the internet... the error is... discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientRequestError: Can not write request body for https://discordapp.com/api/v6/channels/454374995758678029/messages My imports are import time import discord from discord.ext import commands from discord.ext.commands

Discord.py Bot sending file to Discord Channel

旧城冷巷雨未停 提交于 2020-05-15 05:52:30
问题 I am trying to make my discord bot send a jpg file to my discord server, but I keep getting an error that seems pretty uncommon as I can not find any solutions to it on the internet... the error is... discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientRequestError: Can not write request body for https://discordapp.com/api/v6/channels/454374995758678029/messages My imports are import time import discord from discord.ext import commands from discord.ext.commands

Line separator/break in discord embded

冷暖自知 提交于 2020-05-12 11:12:13
问题 I have the following discord embed: message.reply({ content: '', embed: { color: 11416728, author: { name: 'xx know-it-all', icon_url: 'https://xx.png' }, description: '', footer: { icon_url: client.user.avatarURL, text: '© xx Network' }, fields: [ { name: '1st Line', value: '2nd Line', }, { name: 'MAKE THIS JUST A SPACER', value: 'MAKE THIS JUST A SPACER', }, { name: '5th Line', value: '6th Line', } ] } }) I am trying to figure out how to create a spacer of sorts. I have tried using a html

Line separator/break in discord embded

寵の児 提交于 2020-05-12 11:11:55
问题 I have the following discord embed: message.reply({ content: '', embed: { color: 11416728, author: { name: 'xx know-it-all', icon_url: 'https://xx.png' }, description: '', footer: { icon_url: client.user.avatarURL, text: '© xx Network' }, fields: [ { name: '1st Line', value: '2nd Line', }, { name: 'MAKE THIS JUST A SPACER', value: 'MAKE THIS JUST A SPACER', }, { name: '5th Line', value: '6th Line', } ] } }) I am trying to figure out how to create a spacer of sorts. I have tried using a html

Line separator/break in discord embded

社会主义新天地 提交于 2020-05-12 11:11:08
问题 I have the following discord embed: message.reply({ content: '', embed: { color: 11416728, author: { name: 'xx know-it-all', icon_url: 'https://xx.png' }, description: '', footer: { icon_url: client.user.avatarURL, text: '© xx Network' }, fields: [ { name: '1st Line', value: '2nd Line', }, { name: 'MAKE THIS JUST A SPACER', value: 'MAKE THIS JUST A SPACER', }, { name: '5th Line', value: '6th Line', } ] } }) I am trying to figure out how to create a spacer of sorts. I have tried using a html

How to change nickname (discord.py)

老子叫甜甜 提交于 2020-04-28 10:52:35
问题 I want to make a command that changes a nickname to a specific user (Let it be Example # 1234). This command accepts an argument in which a new nickname must be entered, to which the old nickname must be changed - g!Chnick "ExampleNick". I do not know how to change the nickname to users of the Discord server, I tried it through the Guild class, I tried it through the Member class. (Sorry for bad english) 回答1: It's not hard! For example you can use: @client.command(pass_context=True) async def

Discord Python Bot - User input

你。 提交于 2020-04-18 03:09:24
问题 So I want to make a discord python bot that takes user inputs. what I want to do is count % of something. Here is what i want to do : I made this code before starting on the discord bot. But I don't know how to take user inputs. userInputOriginalPrice = float(input("Enter the original price: ")) userInputPercentage = float(input("Enter how much percantage: ")) discount = ( userInputPercentage / 100) * userInputOriginalPrice finalCost = userInputOriginalPrice - discount print("You saved",

Discord Python Bot - User input

谁都会走 提交于 2020-04-18 03:07:40
问题 So I want to make a discord python bot that takes user inputs. what I want to do is count % of something. Here is what i want to do : I made this code before starting on the discord bot. But I don't know how to take user inputs. userInputOriginalPrice = float(input("Enter the original price: ")) userInputPercentage = float(input("Enter how much percantage: ")) discount = ( userInputPercentage / 100) * userInputOriginalPrice finalCost = userInputOriginalPrice - discount print("You saved",