discord

How Find Emojis By Name In Discord.js

♀尐吖头ヾ 提交于 2020-01-06 05:37:08
问题 So I have been utterly frustrated these past few days because I have not been able to find a single resource online which properly documents how to find emojis when writing a discord bot in javascript. I have been referring to this guide whose documentation about emojis seems to be either wrong, or outdated: https://anidiots.guide/coding-guides/using-emojis What I need is simple; to just be able to reference an emoji using the .find() function and store it in a variable. Here is my current

discord.py add to json file on server add

泄露秘密 提交于 2020-01-06 05:18:06
问题 I am wanting my bot to add the server ID and prefix of choice when they do $prefix (desired prefix) to the JSON file called settings.json. I have an example of this JSON file below. { "496019377515266060": "$" } I need it so when users type $prefix (desired prefix) it will add their server ID and the prefix of choice if not there or if it is there it will just update the prefix. I have got as far as making custom prefixes but I cannot make it so users can change them. NOTE I am not using the

discord.py add to json file on server add

烈酒焚心 提交于 2020-01-06 05:17:10
问题 I am wanting my bot to add the server ID and prefix of choice when they do $prefix (desired prefix) to the JSON file called settings.json. I have an example of this JSON file below. { "496019377515266060": "$" } I need it so when users type $prefix (desired prefix) it will add their server ID and the prefix of choice if not there or if it is there it will just update the prefix. I have got as far as making custom prefixes but I cannot make it so users can change them. NOTE I am not using the

Mentioning Users and Self with Discord.PY

若如初见. 提交于 2020-01-06 05:07:57
问题 I'm still really new to coding and the only way I can get this command to work is by doing what I'm doing below. I'm pretty sure there's a better way to write it, but it's not exactly how I want it anyway. I'm trying to mention the user who uses the command at the beginning and then mention the user that's mentioned within the message. message.author.name is only returning the name of instead of the actual tag of the user that uses the command. Also - I'm not sure if there's an easier way to

How to use fetchMessages() to fetch a certain amount of messages then send them in a certain way?

≡放荡痞女 提交于 2020-01-06 04:41:06
问题 What I would like to do is to take information from resolving a promise from fetchMessages() and then being able to go through the collection it gives and then being able to send certain pieces. For example, the bot will list 10 messages looking like GalaxyDJx#2462: hi by, if possible, finding the information (e.g. username, discriminator, message content) and then having each piece of information set to its own variable such as var uname , var discrm , and var msgcnt . The information I got

Discord Webhook Message cannnot send

感情迁移 提交于 2020-01-06 02:32:09
问题 So I have this code that someone had posted from awhile back. It has been working flawlessly for a year now. It takes the google form answers and posts them to discord channel as a webhook. Now since yesterday, it is not working anymore. Nothing has changed with the script. function onSubmit(e) { var form = FormApp.getActiveForm(); var POST_URL = "****"; var allResponses = form.getResponses(); var latestResponse = allResponses[allResponses.length - 1]; var response = latestResponse

Referring to a member as a variable in Discord.py

别来无恙 提交于 2020-01-05 06:51:11
问题 I'm trying to make a discord bot that runs chat filter; my end goal is for a bot to have a list of words and if one of those words from the list is said, the bot will add a tally to a member and if they get like 3 then a command to kick from server will run. Creating the list is easy and I know how to write the command to kick someone, but I am absolutely lost on how I would get the bot to track values for each member.... Would I need to set the member's ID as a variable? Any help is

How to make a embed to the user requirments?

笑着哭i 提交于 2020-01-05 06:49:20
问题 So I'm coding a discord bot and wondering how I would do this If the user inputs ~embed Title Description Colour It will output an embed with the requirements. How would I do so? And thanks @André Heres my code : https://ghostbin.com/paste/uetpj 回答1: One way to do it would be with a character that the user needs to use to separate the fields. Like | or ;; . Something the users wont usually type in the messages. Then you can split the message with that character. var arguments = myString.split

Better way to write recursive random variables

杀马特。学长 韩版系。学妹 提交于 2020-01-05 04:20:14
问题 I know this is really bad, but it works and it was the only way with my current knowledge to complete the job. So I am looking for a "better" way in practice to write this. Basically it shows 3 slots of images and those 3 slots change images with the random images listed in SLOT_PATTERN . The images change using edit_message to edit the previous 3 slot images that were there, replacing them with random images from the given list. import discord, asyncio, time, random client = discord.Client()

Discord.py discord.NotFound exception

﹥>﹥吖頭↗ 提交于 2020-01-04 09:39:30
问题 everyone. I've been working on a few bots for my discord server and I've come across an issue in one of them which I cant seem to solve. I have a command called 'info', essentially, this command displays some information on a desired user. When I call the command ?info [user] , it works just fine until I intentionally request the info on a user that doesn't exist to test an exception I have in place. Here' @laugh.command(pass_context=True) async def info(ctx, user: discord.Member = None): if