#development
1 messages · Page 1358 of 1
I don't even know what he wanna do exactly
ok, that's completely different to what u explained above, but ok
last_line_break = string.split("\n").slice(-1)[0];
so \n within 1024 range?
yeah
addField can take up to 1024 lengths. I want to divide the last \n of 1024 to make the lyrics look good.
(El Yasso)\n\nYaşarım her anı hype\nGoodbye bad vibe\nDiyolar \"Yapalım pipe\"\nZaten kafa Red Light\nOlmazlar hiç offline (Alo)\nVampirler hep online\nÇok collabo ortam, L sar\nYetmez kilogram (Siktir)\nKafanı kıran baseline'ım\nSözlerimiz olur destan\nKüçücük çocuklar ezber yapamaz beni\nBen değilim ben trapstar\nYolun sonunda polis\nİhtimallerin içinde bulunur hapis, yes\nÇıkmaz sokaklarım risk\nDolu belinde emanet sağı solu kes\nPes etmedik biz hiç\nEs vermedik bugüne kadar\nStres, dert gelir hep üst üste press\nFast life fast die, please god bless\nGiremezsin, gizli bir bölge bu\nGörmesin tezgahı ört, hey\nİçimde dinmez bir öfke bu\nYaklaşıyor felaket\n\nGer göğsünü gez bütün âlem\nÇekemez konuşur el âlem\nDelikanlı görsün bu mahalle\nAlev, alev, alev\nYandır dönsün meşale\nZaten yattı bu ihale\nVur baba dönsün nevale\nAlev, alev, alev, alev\n\nKafamız on numara, ey\nGeziyoz bitch ukala gibi\nYavşaklar tilt bu ara, ah\nKafanı vur duvara, ey\nSürtükler gece arar\nÇiz Ati sabaha kadar, ey\nBirer sana bana, ha\nHaz etmem hiç yalakadan\nYa, bi' dumanla high olmam, legalize it\nHak edene party var, ama sana high kick\nÇabalar yalak adamlar alamaz diss\nKafa taş la mantar yani havalar mis\nAramazsam kaltak kafa yakar\nBana aşkla yanaşmakta, saçma sapan kıçım arşta\nSavaşmam kaçmayana kadar\nPara bastım dar zamanda banka kadar\nBana bakma, taşak paçamdan aka aka\nHarçlık balya balya çıkar ramazana\nKara kışta yattık ha kıç dona dona\nParasıyla aldık rap'ine de koca soba\nSenin kıça tıpa, benim rap'im nigga\nÇekip bi' fırt devam, keyif gelir her an\nYenilmedim ama delirmeye ramak kala bil\nHayalim hamak falan değil\nYa da yalan paradise\nKafam kazan, anla bitch, ah\n
lyrics file like this.
oh... got it now
hi
@earnest phoenix
let result = [];
let string = "your text";
let split = string.split("\n");
let idx = 0;
for(let i = 0; i < split.length; i++)
{
if(split[i].length == 0) continue;
let len = ((result[idx]) ? result[idx].length : 0);
if((len + split[i].length) < 1024) result[idx] += split[i] + "\n";
else
{
idx++;
result[idx] += split[i] + "\n";
}
}```
result is an array with each item being not longer than 1024
thx
You can basically create a loop and add each item of the array result as embed field.
I'll try it after the game.
You can basically create a loop and add each
itemof the arrayresultas embed field.
@boreal iron I'll do that. thanks.
['commands'].forEach(handler => {
^
TypeError: Cannot read property 'forEach' of undefined
how do i fix this
that error doesn't make sense, lmao
u can of course access the array directly using forEach
indeed missing a ;
where
Multiple ; are missing
Usually, Automatic Semicolon Insertion is enough to do the job. You don't need semicolons in JS, but JS is dumb a large number of times.
lite ty that was the problem
You don't need semicolons in JS, but JS is dumb
indeed, but the correct syntax requires ;
being to lazy to add ; is... errr... idk what to say
The correct syntax in that situation. The error is just very ambiguous.
Using semicolons or not is the developer's choice. I prefer them (especially since I don't want to alternate often when using other languages).
message.awaitReactions(filter, { max: 1, time: 10000 }).then(collected => {
if (collected.first().emoji.id == 771205690239746079) {
const e = new Discord.MessageEmbed()
.setAuthor(Cancelled by ${message.author}, message.author.avatarURL({ dynamic: true, format: 'png', size: 1024 }))
.setTitle(Server Setup • Cancelled)
.setDescription(Server Setup **cancelled**.\nTo restart the process, do #serversetup again.)
.setTimestamp()
.setColor('RED');
return message.channel.send(e)
}
Why no work? Lmao cannot read property emoji of undefined
Check if the collection is empty.
You also didn't include errors: ["time"] in the options.
Which would throw an error instead of returning an empty collection.
You also didn't include
errors: ["time"]in the options.
@sudden geyser ive never needed to do that
like im confused sorry
uh so is it not working bc im taking too ling?
Did anything pass the filter in the time you had?
Just console.log(collected)
ok?
(node:9576) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'emoji' of undefined
at D:\dbots\EyeBot Security\commands\serversetup.js:40:38
(node:9576) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:9576) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
``` @boreal iron
So it is empty
If you're sure you're reacting as expected, you may want to check your filter.
As it's likely not returning truthfully.
Aka nothing passes the filter
const filter = (reaction, user) => {
return user.id === message.author.id;
};
@sudden geyser wait i should be texrting a emoji??
im so confused lol
No, it expects a reaction.
does the error appear as soon as you react or only after 10 seconds?
10 secs
are you reacting to the correct message?
ye lul
Can anyone solve my question?
https://stackoverflow.com/questions/64616019/how-do-i-find-the-main-directory-of-my-balena-project
hello how can i set background color like song colors
iterate over every pixel and see which color is the most dominant one
how can i do that its my first canvas project
lmao
since you're using canvas
there's also a trick of drawing the image on a 1x1 canvas
i just remembered that
i used that trick in web design to generate card backgrounds
nevermind i did some research
it gets you an average color
not the dominant one
Welp, I am back here again. My welcome message I put together isn't working... I feel like it's something obvious that I am missing...
bot.on('guildMemberAdd', member => { member.guild.channels.get('762109185562247199').send("Welcome"); });
what isn't working
is the event not getting triggered at all
or
The event isn't being triggered at all
you need to enable server members intent in your discord developer portal
otherwise you wont receive member events
OHHHH
I enabled presence intent
ty <3
hey guys, i am looking for builders and scripters for my game, someone interested?
yep
just show the error, the code and the context and ill be able to help you
im pretty sure you didnt wrote the entire code
nah thats not the issue
i wont tell you the answer rn as im not 100% sure about it but
try to analyze every line of your code
what it does
where it goes
etc
this is probably the issue
no
wait
hmm
idk
try to console.log file
and just file
i saw tim typing, i'll let him continue to help you if he's still around
i'm gotta sleep, 12:38am hurts
not from this file
another error from another file
check ur console
then dont use discord.js commando ig
use the normal one
or
which version of commando are you using?
thanks discord
xD
you should consider using discord.js
install it from github
npm install discordjs/discord.js-commando
that will install 0.11-dev
you need to have git installed
Hi anyone knows how to setup on_dbl_vote without cog?
I am using a forEach, for each guild that I find the user in with my bot. How would I do this:
let count = 0;
guilds.forEach(g => {
msg.reaction.add(`reaction here`) //translate the 0 or a 1, 2, etc into: :one: :two: :three:
count++
})```
if(!message.guild.id == "Id here") return;
``` It supposed to only work in said server but it still works in all servers, Doesnt return a error
i mean thats one way of doing it. you could probably use the find method, and use the predicates to find the guilds your user is in. its an id of what you can do extreme
if(!message.guild.id == "id") return; // If this is true, then we are going to return false, and vice versa
if(message.guild.id !== "id") return; // if they don't equal each other then return false, else return true
Ohh thanks
np
you defined member as message? How's that working out in your head?
Show us mod-logs.js maybe
It's your code. I don't know what file you want.
It's just what you assigned member as for the variable.
Though to be perfectly honest, you should go to bed. Because:
Tired Programmers are Dumbass Programmers
what
Yeah go to sleep, this doesn't make sense.
So the user running the command couldn't be resolved to a guild member
When you wake up realise you can't put a message handler inside a command that's already in a message handler
There are scenarios where it may be null, like if the command was run in a DM
No there are no scenarios where a command should have a client.on("message" line.
This is 100% wrong
Confused. Scenarios referring to where message.member will be null
your basically making another instance of the event.
This should be a simple function that's called directly from the existing message event.
That would make perfect sense.
^^^^^
Having more than one handler for an event means that all the handlers are run at once, which means, you're using more code for the same thing, more CPU, more RAM, more everything.
This should be something like ```js
module.exports = (client, message) => {
// run the thign you need to run directly
};
Then imported where the message event is, and run as: ```js
yourmodlogfunction(client, message)
inside the message event.
Go sleep.
Sleep good.

Confused. Scenarios referring to where
message.memberwill benull
@sudden geyser
Yeah, I'm having this issue.
I'm using my bot in my server andmessage.memberis consistentlynull.
Old code that's worked for months is suddenly not working.
@viral plover Discord started enforcing the GUILD_MEMBERS intent requirement On Oct 27th
Discord's Article on the subject: https://dis.gd/gwupdate
If your bot has stopped being able to access cached members, you don't have access to the privileged GUILD_MEMBERS Intent. GUILD_MEMBERS is a privileged intent, it is not sent to bots that have not been allowed to use it.
If your bot is not verified you can go turn on the GUILD_MEMBERS intent in the Bot section of the dev portal, or you can fetch the users manually.
If your bot verified, need to request this privileged intent from Discord through https://dis.gd/contact (general request), or figure out how to fetch members only when necessary.
Oh okay.
Thank you very much.
@earnest phoenix https://www.youtube.com/watch?v=nW8c7vT6Hl4&t=720s&ab_channel=Lucas will be easy to start
In this video, we go over how to setup a discord bot in python using discord.py v1.0.1 (rewrite).
If you have any suggestions for future videos, leave it in the comments below.
GITHUB: https://github.com/Rapptz/discord.py
DOCUMENTATION: https://discordpy.readthedocs.io/en/la...
I'm using discord.py atm
I'm trying to make a text based adventure game where you start by saying a command in the server the bot is on and then dms you a randomly generated story
Sounds like a great project.
ye but pretty much work
hey guys
Yeah a lot of work and logic and a whole lot of writing code and text, too.
i have a question
yep?
why my music bot is throwing this
😢
every time i want to play any song it crashes and show that
Yeah a lot of work and logic and a whole lot of writing code and text, too.
@umbral zealot the downside is i don't know alot of python, i only know the basics like async def, def, variables and the print command
Well then you have quite the challenge ahead of you!
Wow thanks
Text-based adventures are super interesting, actually, but they're not for the faint of heart.
They're mostly about data, though. What data to pull when, what logic path to take... I'd start with writing down some of that logic on paper.
XD
@earnest phoenix so fix it soon
hell yeah
okey 
They're mostly about data, though. What data to pull when, what logic path to take... I'd start with writing down some of that logic on paper.
@umbral zealot ok I'll learn more python
You'll need to think about that logic regardless of what language you're using
It's about the core data flow, not about what syntax to use. Though yes, you'll need a fair amount of programming knowledge to do it, too.
I have no name!@1600eca8-80d0-4054-a8a2-064bfe38ecde:~$ node index.js
/home/container/index.js:10
client.login(config.token)
SyntaxError: Unexpected end of input
at wrapSafe (internal/modules/cjs/loader.js:931:16)
at Module._compile (internal/modules/cjs/loader.js:979:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
client.login(config.token)
SyntaxError: Unexpected end of input
at wrapSafe (internal/modules/cjs/loader.js:931:16)
at Module._compile (internal/modules/cjs/loader.js:979:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47```
Hopefully my text based adventure will be based off from the game the stanley parable and have some random elements
@indigo flax you're missing a } or ) or ] somewhere in your code. Somewhere/anywhere/we can't really tell
const client = new Discord.Client()
const config = require('./config.json')
const command = require('./command')
client.on('ready', () => {
console.log('The client is online!')
client.login(config.token)```
your ready event isn't closed.
@earnest phoenix
you need to use really few things for that:
import random - to randomly choose between stories
made few stories so:
stories = ["name 1", "name 2"]
then randmly choose one by
random.randint(0, len(stories) - 1) - i did -1 on there because lenght doesnt begin with 0 but with 1
[EDIT] there is much more you actually will need but this is good for begin
Ah
@sand dome that's step 1 of 25123 steps of logic 😂
yep
but he said he's not as good at python so i told him a bit about libraries etc he needs to use
No... it's not, Austin.
like random
I can clearly see it's not closed
const client = new Discord.Client()
const config = require('./config.json')
const command = require('./command')
client.on('ready', () => {
console.log('The client is online!')
client.login(config.token)```
Because I'm not blind
YE EXACTLY THAT XDDD
const client = new Discord.Client()
const config = require('./config.json')
const command = require('./command')
client.on('ready', () => {
console.log('The client is online!')
)}
client.login(config.token)```
doesnt work
i completely lost my memory on coding
sorry i didnt
im not in the mood rn
then don't program
because right now you're being a dumbass.
Wait until you can see clearly.
okk
Then step away from the computer, grab a glass of water, take a nap, and come back when you're refreshed and thinking straight 👍
Is there a discord bot API thing that supports LUA
try:
const Discord = require('discord.js')
const client = new Discord.Client()
const config = require('./config.json')
const command = require('./command')
client.on('ready', () => {
console.log('The client is online!')
}
client.login(config.token)
idk might work, i'm not js guy
in arrow functions you might not need this one bracket )
yes because you're tired and not thinking straight and should not be operating a computer right now
just like you shouldn't operate heavy machinery under medication. 😕
hey do you guys know why this function is executed like 1 minute after bot is up and running, cause commands work but it doesn't write this ready and amount of servers that it's in only if i wait like 1/2 mins then it appears:
@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game("$commands"))
print("ready")
print(len(client.guilds))
Are you fetching all members of your guilds, perhaps?
no, only thing i do here is write down lenght of list with all servers where the bot is in
it's simply to know in how many server my bot is
can someone tell me what's the code for the "avatar" command?
no spoonfeeding
i tried sometimes
i dont even know what avatar command is
to made it by myself
It's literally just getting the avatar URL from a user object.
yeah but i'm a novice coding
xD
the avatar command as if it's something glorious we're all supposed to know about 
guessing you are using unmodified discord.js 🤮
if you can't figure it out look at documentation of other sources like github and stackoverflow
guessing you are using unmodified discord.js 🤮
@hot crest no
@earnest phoenix Useful links for learning JavaScript and Node:
Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
unmodified libraries 🤮
basically right now, "Go learn the language first then it will become obvious"
yep
check the docs
xd
Ok then go look at the documentation of the library you're using 👍
i'm using node(?
Otherwise what do you expect from us, that we first guess what language you're using, then we guess what library you're using, then we guess what structure your bot uses for code, and then we spoonfeed you the exact code you need, thus, writing the bot for you leaving you in a position of doing literally nothing and us doing all the work?
Go look at the docs and do it yourself, don't be a help vampire.
i'm using JavaScript
Spoonfeeding is bad
Here. This is what you need: https://discord.js.org/#/docs/main/stable/class/User?scrollTo=displayAvatarURL
all you have to do is add parameter to emblem like image or icon and put there this url
wich URL?
the avatar url
alright
would not
alright
dynamic meaning -- if the user has a animated profile picture it will show it as the file format instead of a still png
yep
thx guys
now i got problems with 3 commands
(my bot is no spanish so i'll try to translate)
when i use my kick command
i have to mention someone
that's right
but
at reason appears the mention
could you please make complete sentences before sending messages.
@earnest phoenix code?
wait
client.on('message', msg => {
if (msg.content.startsWith(prefix + 'kick')) {
const args = msg.content.slice(prefix.length).trim().split(/ +/g);
let user = msg.mentions.users.first();
if (!user) return msg.channel.send('X | Debes mencionar a alguien xD')
let razon = args.slice(1).join(' ');
var perms = msg.member.hasPermission("KICK_MEMBERS");
if(!perms) return msg.reply("X | usted no puede kickear xD");
if (!razon) return msg.channel.send('X | Falta la razón xD');
if (!msg.guild.member(user).kickable) return msg.channel.send('X | no puedo expulsar a este humano xD');
msg.guild.member(user).kick(razon);
msg.channel.send(:white_check_mark: | Usuario Expulsado: ${user.username} | Razón: ${razon}.);
console.log('Kick usado.')
}
});
razon means reason
the mention is the reason and idk why
Well you're probably getting the wrong argument
Step 1) learn js
Step 2) learn to manipulate strings in JS
STep 3) ???
Step 4) PRofit
as in like an input
@drifting wedge that's Python not html??
@drifting wedge that's Python not html??
@hollow sedge like in html
<input type="text" class="form-control" aria-describedby="basic-addon1" placeholder="{{ vanityurl }}" id="vanityurl">
this is my input
how can i make this a form
So..you want to get input with flask?
yes
no like like i have an input
how can i id it as a form
{{form.vanityurl(size=30)}}
Idk what you're asking
But all the information to getting an input should be in link
how would you have a bot screen share discord.py
You don't, bots can't do video streams and screenshares.
..
Your friend is wrong.
self bot time lmao
wait so basically
i have an input from in html right
with wtf-flask
It's better to use something other than screen sharing anyways
As in there are better alternatives
@hollow sedge i was planning on doing a movie bot
how can i have that as inputs
as a addon
Well you can't do a movie bot. It's just not possible.
ik
Wait what? How would you get the movies
It would be illegal anyway
Exactly
yea true
@drifting wedge ? I don't understand why my link won't work for you
Why is guild.owner returning null
@drifting wedge ? I don't understand why my link won't work for you
@hollow sedge we have css styling
which response
/
@carmine summit you need to fetch members that are not cached.
Discord started enforcing the GUILD_MEMBERS intent requirement On Oct 27th
Discord's Article on the subject: https://dis.gd/gwupdate
If your bot has stopped being able to access cached members, you don't have access to the privileged GUILD_MEMBERS Intent. GUILD_MEMBERS is a privileged intent, it is not sent to bots that have not been allowed to use it.
If your bot is not verified you can go turn on the GUILD_MEMBERS intent in the Bot section of the dev portal, or you can fetch the users manually.
If your bot is verified, need to request this privileged intent from Discord through https://dis.gd/contact (general request), or figure out how to fetch members only when necessary.
ah ****
Just literally guild.members.fetch(guild.ownerID) that's it.
yes. because of the changes in intents.
what? no.
The cache will still fill up with certain things, discord.js can still create the member cache on some things.
how do i do input forms with flask / html
@drifting wedge ask https://google.com
but it won't get as many members. So you need to fetch them manually as necessary.
wdym manually
smh !!
I mean using guild.members.fetch("some user ID") to fetch members as you need them.
This gets you the data and adds that data to the cache.
so remove the .cache
client.users.cache contains online/active users
before the change, your bot would receive a list of all online users and they would all be placed in the cache
after the change, your bot only does that if you have the server members intent enabled in your discord developer page
not "just remove cache". Fetch is not the same as get().
regardless if you have them cached or not, they can be manually cached by using the .fetch() function
aghhh this new update makes me confusing
so I have to do guild.members.fetch()
then i can use .cache
yes
guild.members.fetch("some id") also actually returns the member, though
but fetch also returns the result, so you dont even need to use cache anymore
well it returns a promise that resolves in the member.
i got a couple of 429 errors today and got blocked for 3 hours
does this mean my bot has been flagged by discord for API spam?
anyone having an issue with guildMemberAdd recently? worked last week, now is no longer working
@compact briar Discord started enforcing the GUILD_MEMBERS intent requirement On Oct 27th
Discord's Article on the subject: https://dis.gd/gwupdate
If your bot has stopped being able to access cached members, you don't have access to the privileged GUILD_MEMBERS Intent. GUILD_MEMBERS is a privileged intent, it is not sent to bots that have not been allowed to use it.
If your bot is not verified you can go turn on the GUILD_MEMBERS intent in the Bot section of the dev portal, or you can fetch the users manually.
If your bot is verified, need to request this privileged intent from Discord through https://dis.gd/contact (general request), or figure out how to fetch members only when necessary.
oof thanks
sounds like you need to update to discord.js version 12.
its up to date
That error only happened in v11.
12.4.1
You think you're on v12 but you're not.
can you run npm ls discord.js in your project folder
.. show you what version is actually installed.
How could i move a message?
I mean, if the message goes too high in the chat, i want to "resend it"
You can't re-send it from the user's account, so it would come from the bot
but you can just send a message to another channel, using the message content from the user.
it would be a message generated by a bot
A bot is still a user that sends messages, so that doesn't change how you do it.
at Client.<anonymous> (D:\dbots\EyeBot Security\index.js:21:17)
at Client.emit (events.js:315:20)
at Object.module.exports [as GUILD_CREATE] (D:\dbots\EyeBot Security\node_modules\discord.js\src\client\websocket\handlers\GUILD_CREATE.js:33:14)
at WebSocketManager.handlePacket (D:\dbots\EyeBot Security\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (D:\dbots\EyeBot Security\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (D:\dbots\EyeBot Security\node_modules\discord.js\src\client\websocket\WebSoc at WebSocket.onMessage (D:\dbots\EyeBot Security\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:315:20)
at Receiver.receiverOnMessage (D:\dbots\EyeBot Security\node_modules\ws\lib\websocket.js:797:20)
at Receiver.emit (events.js:315:20)```
guild.owner.send(`Hey there, ${guild.owner}! Thanks for inviting me to **${guild.name}**!\nDo #serversetup to set your server up with my many features such as ModLog, Auto Security Anti-Nuke, and much, much more!`)
uh
@zenith knoll Discord started enforcing the GUILD_MEMBERS intent requirement On Oct 27th
Discord's Article on the subject: https://dis.gd/gwupdate
If your bot has stopped being able to access cached members, you don't have access to the privileged GUILD_MEMBERS Intent. GUILD_MEMBERS is a privileged intent, it is not sent to bots that have not been allowed to use it.
If your bot is not verified you can go turn on the GUILD_MEMBERS intent in the Bot section of the dev portal, or you can fetch the users manually.
If your bot is verified, need to request this privileged intent from Discord through https://dis.gd/contact (general request), or figure out how to fetch members only when necessary.
In discord.js: guild.members.fetch(guild.ownerID) to fetch the guild owner.
the thing is
is an embed message that i'm editing constantly simulating a game, based on the user's input
but if the message goes too high, i want to move it to the start of the chat
and deleting the old message and sending a new one generate problems because i'm editing the old message
if you're editing it constantly, you have its current state to edit, don't you? So just send() it instead of using edit()
¯_(ツ)_/¯
and the references got confused
Well I dunno then, definitely new Discord.MessageEmbed() should work perfectly fine.
i checked
if I delete the old embed message and send a new one, the reference to the message that i was editing get lost
let me double check
@feral arch sounds like something that you can fix, then. That's the only way to "move" a message - to send a new one.
god
fuck
i was exporting the thing wrong
ya know
.execute(message, args, color, PREFIX, Discord, bot);
this thing
i had them in the wrong damn order
the worst part is, is that that wasnt the first time
Glad you figured it out! 👍
are messages passed by value or by reference?
which lang? @feral arch
Js
o
is it better to use <form> or fetch() in html?
it depends on what you're trying to do
Hello, i got a problem with reaction embed thing when i run the command and then run it again and click on the reaction on that command the embed before the new embed changes as well as the new embed

im using this res = await self.bot.wait_for('reaction_add', check=lambda r, u: u.id == ctx.author.id, timeout=15)
@pale vessel sorry for ping and late response, assuming I am trying to upload a file to a host
you should use form then
wdym
roki and I couldn't get the file to upload correctly
<form method="POST" action="/upload"> stuff <input type="submit"></form> for example
not all browsers support fetch
oh
uhh
my bot was caching over 1 million users after startup, but ever since the domain move and after it's reached over 3k servers and has been updated to the newest release of d.js, it's only been caching 20 thousand
anyone else getting this?
Do you have intents enabled?
the code hasn't been modified at all since this, only d.js has been updated
i don't believe so
Then that may be your issue.
it's causing a lot of bugs
ah
After fur friend's intent request got approved, you can enable intent on your bot code
is that a new features or something?
Yeah
how new?
Discord APi update and shit
and what does it do?
then how could this relate to my problem?
Ask lite he have more knowledge in intent ig
there's no issue with api limits
or maybe there is
i don't have access to the console
well i do
im just lazy and only have one monitor lmao
It makes it so you can subscribe to certain events you receive from gateway (intents will apply to some rest routes in the future). You can enable the intent on the developer portal, but I think requesting intents requires you asking Discord for support on it. Though, a lot of bots get rejected even if they think they need intents because there are ways to work without intents.
I don't have the best knowledge on intents either.
But that's roughly how it goes.
Hello, i got a problem with reaction embed thing when i run the command and then run it again and click on the reaction on that command the embed before the new embed changes as well as the new embed
@limber flume i have the same problem xD i was trying deleting the old message, but i had problems with references
Discord even has this article you can read https://dis.gd/gwupdate
many thanks
how would i apply for those intents?
Its in discord dev portal ig
nope
this?
the bot is already verified, and the article only shows you how to verify it
most articles suck tbh, they don't tell you a lot of information
what happens if you JSON.stringify() an object like Map or Promise or smth
most articles suck tbh, they don't tell you a lot of information
@terse girder because you ignore half of it
most things they say get repeated in them
just to ignore the actual unanswered questions
nope
@terse girder you're saying that discord support articles suck because they try to explain you the basics before answering your questions
no, im saying they suck because they only tell you nothing but the basics
but some tell you decent information
module.exports.run = async (bot, message, args) => {
const embed = new Discord.MessageEmbed()
.setTitle("How to put message author's avatar as a thumbnail?")
.setThumbnail(message.author.avatarURL)
.setColor('#975e0a')
.setTimestamp()
message.channel.send(embed);
}
module.exports.config = {
name: "embed",
description: "example of an Embed.",
usage: "m!embed",
accessableby: "Members",
aliases: []
}```
it doesn't load the message author's avatar
oops
avatarURL() doesn't work with users without a profile picture though
if you want to support that, use displayAvatarURL()
are 'guild_presences' and 'guild_members' the only intents that requires whitelisting?
yeah
ah
const user = "183936902141968385"
module.exports.run = async (bot, message, args) => {
const embed = new Discord.MessageEmbed()
.setTitle("How to put message author's avatar as a thumbnail?")
.setThumbnail(message.author.avatarURL())
.setColor('#975e0a')
.setTimestamp()
user.send(embed);
}
module.exports.config = {
name: "embed",
description: "example of an Embed.",
usage: "m!embed",
accessableby: "Members",
aliases: []
}```
now i got this so i want it to send a message to @lethal sundial every time someone enables the command
it's of course incorrect
you didn't even fix the #development message
what is the command itself
ok
const user = "183936902141968385"
module.exports.run = async (bot, message, args) => {
const user = memberID => '183936902141968385';
const embed = new Discord.MessageEmbed()
.setTitle("How to put message author's avatar as a thumbnail?")
.setThumbnail(message.author.avatarURL())
.setColor('#975e0a')
.setTimestamp()
user.send(embed);
}
module.exports.config = {
name: "embed",
description: "example of an Embed.",
usage: "m!embed",
accessableby: "Members",
aliases: []
}```
what is wrong in here
@sturdy star whats the error?
hm
never tried doing that
ok lemme try that
nah
same error
i also tried to put the const user = "183936902141968385"; inside the module
and it's still the same
that's strange
Actually, discord.js doesn’t know that it’s a user. You gotta do smth like:
const user = <Message>.client.users.cache.get(ID)
should i put it inside the module?
@sturdy star well, yes.
TypeError: cannot read property 'send' of undefined
What did you put?
module.exports.run = async (bot, message, args) => {
const user = message.client.users.cache.get(ID)
const embed = new Discord.MessageEmbed()
.setTitle("How to put message author's avatar as a thumbnail?")
.setThumbnail(message.author.avatarURL())
.setColor('#975e0a')
.setTimestamp()
user.send(embed);
}
module.exports.config = {
name: "embed",
description: "example of an Embed.",
usage: "m!embed",
accessableby: "Members",
aliases: []
}```
@sturdy star not literally ID, I meant the user id...
yes, i copied your one
replace ID with the user ID you wanted
my actual code is like this:
module.exports.run = async (bot, message, args) => {
const user = message.client.users.cache.get(183936902141968385)
const embed = new Discord.MessageEmbed()
.setTitle("How to put message author's avatar as a thumbnail?")
.setThumbnail(message.author.avatarURL())
.setColor('#975e0a')
.setTimestamp()
user.send(embed);
}
module.exports.config = {
name: "embed",
description: "example of an Embed.",
usage: "m!embed",
accessableby: "Members",
aliases: []
}```
yes that's my code
You forgot to make the user id a string
That would work too, but what I meant: 'ID'
oh
how is it to see the verification level in a field
message.guild.verificationLevel I think
👍
thank you very much 
Dont ask to ask
client.guilds.cache.has
this.client.guilds.cache.get
What is the property before toUppercase?
args.shift() is a function
@earnest phoenix Well, it basically means that args is undefined
It can’t shift smth that has no value
no, it means that args is empty
would you like to see the whole file code?
@earnest phoenix yes of course with the bot token too
is there any script , where you can clear the ram?
process.exit()
without that xd?
Empty your caches is a thing you can do
@twilit rapids How do u empty cache?
How can I add the Server Count?
why this dosen't respond ??? ```
client.on('GuildMemberAdd', (member) =>{
console.log(member);
});
that's not a valid event
it's guildMemberAdd
and you need the server members intent to receive any kind of member events
hey
um
does anyone know of a work around for hosting discord bot on glitch? uptime robot doesn't work since glitch has banned ping services
i dont wanna run a script on my host machine
rent a cheap vps
I wanna make a list with all guillds. But because its more then 2000 characters that's a no-go, so I wanna split it in parts (embed pages), how I can do that
well im looking for a free service since im still a student and dont have money xD
@earnest phoenix why not just upload the list to some bin service, i.e. hastebin or paste.mod.gg
@crystal wigeon a vps is 3 bucks a month
that is also a way, but it would be cooler in a embed
what's gcp?
google cloud platform
o
where i have prob?
if (message.member.hasPermission("MANAGE_MEMBERS")) {
let person = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[1]));
if (!person ) { return message.reply("You didn't specfiy a person!"); }
let time = args[2];
if (!time) { return message.reply("You didn't specify a time!"); }
let mainrole = message.guild.roles.cache.find(role => role.name === "Members");
if (!mainrole ) { return message.reply("Couldn't find the main role"); }
let muterole = message.guild.roles.cache.find(role => role.name === "Muted");
if (!muterole) { return message.reply("Couldn't find the mute role"); }
person.roles.add(muterole.id)
person.roles.remove(mainrole.id)
message.channel.send(`${person.user} has been muted`)
setTimeout(function () {
person.roles.add(mainrole.id)
person.roles.remove(muterole.id)
message.channel.send(`${person.user} has been unmuted`)
}, time * 10000);
}
break;```
it will mute and unmute the person instantly
there is none
there is gcps free tier without a credit card but it's super weak
it can't even run node without crashing iirc
it wont even let me create a vm without credit card
Where did anyone even make a website- I just wanna know that.
how can i get the roles of a user in a discord server thats in a different shard
Hello so quick question
Due to discord docs updating for some reason when I wanted to show the amount of users the bot was watching I did
bot.users.cache.size
What is the update for that now?
I'm not sure lok
Lol
no one answered mine-
@wild adder this works for me
client.guilds.cache.reduce((a, g) => a + g.memberCount, 0)```
Alright thanks
it's guildMemberAdd
@earnest phoenix nope it's not working
It's not that
Where did anyone even make a website- I just wanna know that.
@mighty quail :c
Well I don't think
@mighty quail what website
For my bot.
Hmm
@lean wing did you enable the intent
@mighty quail well, you can download templates for websites which is the easier way or you could learn html and css
Ye
Where can I get the templates?
you could use a bootstrap template

Bootstrap?
discord bot dashboards are way more complex than just fancy html and css
@lean wing did you enable the intent
@earnest phoenix no
well enable it
you could use a bootstrap template
@obtuse jolt Link?
you dont need to
Why i have this error in this code
you tell me
@mighty quail I use this https://startbootstrap.com/themes/sb-admin-2/ and mine looks pretty nice so, yeah
yours won't look the same
but
¯_(ツ)_/¯
Oo-
Hi, I'm adding the bot to my discord but it doesn't appear on "my profile"
if (!message.member.bannable) return console.log(message.member.usetname+" I can't ban this man");
message.channel.guild.members.cache
.get(message.author.id)
.ban()
message.channel.bulkDelete(msgCount, true);
you don't have to keep spamming your issue it's literal 5 damn messages above
me ?
My issue is not on top.gg search or anything like that, it's just not showing at all on my profile, can't create it
@solemn jolt well there are a few things here, bulk delete only deletes up to 100 messages sent in the last 14 days, also you can just do message.guild.members.cache and you are aware you're checking if the user that sent the message is bannable right?
Not the same issue
i was referring to robot reva
oh ok my bad
oh yeah you spelt username wrong
members do not exist in dms, make sure to filter dms out
@obtuse jolt i'll try again
How can I get the bot to add emojis? ($?????)
add the fix for spelling mistakes don't forget that'll come up as an error later on
How can I get the bot to add emojis? ($?????)
bot.on("roleDelete", async channel => {
const entry1 = await channel.guild
.fetchAuditLogs({
type: "ROLE_DELETE"
})
.then(audit => audit.entries.first());
console.log(entry1.executor.username);
const entry = entry1.executor;
if (!entry.bannable) return console.log(entry.username+" I can't ban this man");
channel.guild.members.cache
.get(entry.id)
.ban()
.then(b => {
channel.guild.owner.send(
`**⇏${entry.username} is baned couse delet ${guild.role.lmite} role**`
);
})
})
```
@obtuse jolt bannable is error
I don't think .executor is a thing in channel.guild
your code is basically saying
channel.guild.executor.username
are you testing the bannable against a guild member or just the user?
Guild member not user
I'm not sure, I've never used role delete events
you'll have to ask someone who knows how to use the event
How can i fine someone now role delet event?
you could ask in the official djs discord server
@solemn jolt https://discord.gg/bRCvFy9
@solemn jolt Do u mean reading audit log?
@lean wing did you enable the intent
@earnest phoenix i enable it but it gives me an error
the codeconst client = new Discord.Client({ ws: { intents: ['GUILDS', 'GUILD_MEMBERS', 'GUILD_MESSAGES'] }, });error
Starting bot (node:23632) UnhandledPromiseRejectionWarning: Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted. at WebSocketManager.createShards (C:\Users\30699\Desktop\tsamis_bot\tsamis_bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:258:15) (node:23632) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:23632) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
can you help ?? i dont know how
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
click your bot
click bot
scroll down
enable it
hello
any discord.py dev here who can help me in a function
I want to know
how can I develop a function which checks the time
and then sends a message accordingly
in a range of time
try to use time module
Is a limit of 100 messages okay for a purge command?
ya its ok
yep
thanks, I would like to set a limit to prevent the bot from crashing
@acoustic veldt
import time
def checkTime():
lt = time.localtime(time.time())
return time.asctime(lt)
checkTime()
this will return time like:
Sat Oct 31 13:43:45 2020
thanks bro but thats now what I want , I mean , that when i type a specific command , the bot checks time , and after checking time , if it is 3 pm it says a specific texxt
Not a py dev, but can't you just make another time object and check against that.
3pm in which timezone tho
@quartz kindle IST
const premium = await client.shard.broadcastEval(`this.guilds.cache.get("692021327283879957").members.cache.get("${message.author.id}")`);
console.log(premium);```
It's output is [null] , but this user is in the guild
do you have intents enabled (specifically the server members intent)
no, do I need that, my Bot is verified, than I have to request discord
discord no longer sends you members without the server members toggled on, but you can still fetch them yourself
also, fetching works independently from shards, so you dont even need broadcasteval
can someone help me , how do I make a function which when I type a command , it checks time and then sends a specific message according to the current time
for discord.py
@acoustic veldt Do u have basic coding experience xD?
did u heard from a if-clause?
discord no longer sends you members without the server members toggled on, but you can still fetch them yourself
@quartz kindleSo my idea of premium won't work?
but you can still fetch them yourself
how xD?
@acoustic veldt Do u have basic coding experience xD?
did u heard from a if-clause?
@tired panther yes I do
so then its easy for u
if function wont work because it says that now is not an attribute for date time
await client.users.fetch(id)
I said now = datetime.now() to fetch the current time
it said that it doesnt have a now attribute
await client.users.fetch(id)
@quartz kindle ah , then I can see If he is in mutual guild?
How do u get the mutual guild
So some of my bot commands are premium
to use premium command u must join my server
So in the if clause it will check if the member is already in the server and will return if he already is
therefore I have to know if the user is in my guild @quartz kindle
API NOT WORK !
@acoustic veldt did you check the link i sent you? you most likely have to use a timezone library such as pytz otherwise you will always get the wrong time
unless your hosting server/vps is already in the correct timezone
@tired panther there are tricks for that
I want to know them xD, without enabling intent
with regular discord.js you can either use client.api to send a direct request and receive raw data, or you can create a new guild to enable the managers
for example
@acoustic veldt did you check the link i sent you? you most likely have to use a timezone library such as pytz otherwise you will always get the wrong time
@quartz kindle ohok
so I need to import that libarary ?
with regular discord.js you can either use client.api to send a direct request and receive raw data, or you can create a new guild to enable the managers
@quartz kindle a guild database 🤣
@acoustic veldt yes , how do u want to fetch the times?
member = await (new Discord.Guild(client,{id:"guid id here"})).members.fetch("member id")
or
member = await client.guilds.add({id:"guild id here"}, false).members.fetch("member id")
or
member = await client.api.guilds("guild id").members("member id").get()
these two are not the same, they will give you different kind of data
the first one looks good, thx again
when a person votes or I click on test it doesn't matter there is no error
@quartz kindle ok so I imported and defined ist now how do I use it in my code ??
Unhandled promise rejection: TypeError: Cannot read property 'resolveID' of undefined
at GuildMemberManager.fetch (/home/container/node_modules/discord.js/src/managers/GuildMemberManager.js:116:36)
at Object.execute (/home/container/commands/check.js:8:83)
at Client.<anonymous> (/home/container/bot.js:301:11)
at Client.emit (events.js:314:20)
at MessageCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
@quartz kindle does not seem to work
const premium = await (new Discord.Guild({id:"692021327283879957"})).members.fetch(msg.author.id,false)
if(!premium){
const pembed = new Discord.MessageEmbed();
pembed.setTitle("This is a premium feature.🌟");
pembed.setFooter(`Stay in the server, to have premium ;)`);
return msg.channel.send({embed: pembed,});
}
``` thats the code
one sec pls
it will throw an error if the user is not in the guild, so you can add a .catch(() => null) at the end to make it return null instead of erroring
yeah it works
So to my next problem,
Do u have to have Intent enabled to fetch if a user is offline or online?
for that you need the presences intent
I enabled it for my beta bot, since for my alpha I have to contact discord.
So the button state is on, do I have to add something in the code?, to fetch the data?
okay , will try it rn
and you need a shard id
not sure if it will work using this method becuse discord.js does weird shit behind the scenes
xD
@quartz kindle I am not using sharding in my beta bot
Thats the progress
1.beta bot will check if alpha bot is offline
2. when true it will change the channel name
alpha and beta are in the same server
you still have shards, just only one shard with an id of 0, so you have to use that
new Discord.Guild(client,{id:"guild id",shardID:0})
because the withPresences option has to go through the gateway, it doesnt go through the REST api
ah , U mean that part of shards could be offline
because the withPresences option has to go through the gateway, it doesnt go through the REST api
@quartz kindle unterstood
it needs to know which shard to send from
the beta bot is sending the presence request, and the beta bot does not have sharding
and the shard id is then zero?
yes
a shard is a connection to discord, so you always have at least 1 shard
then when you start sharding, then you will have more shards
now this creates another question, does discord support fetching members from other shards through the gateway? never tested this
let status = new Discord.Guild(client.{id:"guild id",shardID:0});
^ red marked
,
client is the alpha bot?
so i just tested, apparently it doesnt support it
okay xD
so you need to go back to broadcastEval to use withPresences
so you need to go back to broadcastEval to use withPresences
@quartz kindle why do u need brodcastEval, when the bot themself does not have sharding?
broadcasEval(`
this.guilds.cache.get("id").members.fetch({user:id,withPresences:true})
`)
you were using broadcasteval before
but if not just do the same thing without broadcasteval
IST = pytz.timezone('Asia/Kolkata')
now = datetime.now(IST)
@client.command()
async def current_event(ctx):
if now >= 15:00 and now <= 16:00:
await ctx.send(f'......')```
is this correct? @quartz kindle
yes
@acoustic veldt no
why
where do u define now? or is this python ?
if you use datetime.now() outside of command function, then its defined only once, and every time you run the command, the time is always the same, it will be the time fro when your bot started
I hate python, node js ❤️
ok so I need to put it under @client.command() ?
IST = pytz.timezone('Asia/Kolkata')
@client.command()
now = datetime.now(IST)
async def current_event(ctx):
if now >= 15:00 and now <= 16:00:
await ctx.send(f'......')```
@tired panther both are 
It has to be inside the function
no, inside current_event
oh okay
then you can do if now.hour >= 15 and now.hour <= 16
IST = pytz.timezone('Asia/Kolkata')
@client.command()
async def current_event(ctx):
now = datetime.now(IST)
if now.hour >= 15 and now.hour <= 16:
await ctx.send(f'......')```
ok
@quartz kindle so do I need to make new commands for every time if I want another one for between 16 and 17 ?
only if you want to make it a separate command
Promise { <pending> }
``` thats the output
of
```js
let status =
client.shard.broadcastEval(`this.guilds.cache.get("734707332163829780").members.fetch({user:735147814878969968,withPresences:true})`);
console.log(status);
yes, fetch needs awaiting
and so does broadcasteval
so you need to elaborate a bit, also to avoid errors
first check if guild exists, then if it exists await fetch member, then check if member was found, if it was found return status
first check if guild exists, then if it exists await fetch member, then check if member was found, if it was found return status
@quartz kindle the guild and user exist to 100%. Its every time the same
How long does the fetch take, after 20 seks,nothing happnd
: Members didn't arrive in time.
at C:\Users\shahn\3D Objects\Botcode\sharding\node_modules\discord.js\src\managers\GuildMemberManager.js:265:16
at Timeout._onTimeout (C:\Users\shahn\3D Objects\Botcode\sharding\node_modules\discord.js\src\client\BaseClient.js:83:7)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
Unhandled promise rejection: Error [GUILD_MEMBERS_TIMEOUT]: Members didn't arrive in time.
code ```js
async function() {
let status = await client.shard.broadcastEval(this.guilds.cache.get("734707332163829780").members.fetch({user:735147814878969968,withPresences:true}));
console.log(status);
}
@quartz kindle but then it will say that this command already exists so I cant define it twice
@tired panther broadcastEval sends the code to be run in all shards
the guild doesnt exist in all shards
there is just one shard
as soon as the code runs in a shard that doesnt have the guild, it will throw cant get members of undefined
if you plan to use shards, you have to account for this. if you dont want to use shards, then dont use broadcastEval
broadcastEval is only for sharding
@acoustic veldt it'll probably be easier to help you if you explain what you're trying to do
as soon as the code runs in a shard that doesnt have the guild, it will throw cant get members of undefined
@quartz kindle Yes , but the bot will never have more then 2 guilds
discord.js server tells the problem is in intent
wait why are you even sharding it then
because my alpha has sharding, and then I just run the same code, removing before some parts
hey anyone knows why the join messages don't work?
code?
some idea to play music from youtube without download the song on python
?
wait
client.on('guildMemberAdd', async member => {
let guild = member.guild;
let totalUsers = guild.memberCount
let e = new Discord.MessageEmbed()
.setAuthor(member.user.tag, member.user.displayAvatarURL())
.setDescription('Hey <@' + member.user + "> you know that you are the **" + totalUsers + "º** member on this server?")
client.channels.cache.get('768554592136724521').send(e)
})
since yesterday
this doesn't work
intents
enable server intent on the dash
make a regex in this server for intents xD
no
no
hmm ok
^ that
@stuck dawn
yes
ues
So back in the day I verified pretty early and now I can't turn on presence intent cuz I didn't use it back then
Can I still "verify" for it?
ok ty
I’m developer
cool
some idea to play music from youtube without download the song on python
?
@tired panther if your bot wont have more than 2 guilds then dont use broadcastEval
let member = await client.guilds.cache.get("734707332163829780").members.fetch({user:"735147814878969968",withPresences:true}).catch(() => null)
okay thx
guild.presences.cache.add is not a function
at Object.module.exports [as GUILD_MEMBERS_CHUNK] (C:\Users\shahn\3D Objects\Botcode\sharding\node_modules\discord.js\src\client\websocket\handlers\GUILD_MEMBERS_CHUNK.js:13:66)
an error encounterd
^12.2.0
try updating to 12.4.1
are there any big changes?
@quartz kindle my bot is not reating any more
since I updated now
no command working
okay checking now if the error is coming
it gives an huge array
@hollow sedge bro I am trying to make a function , when if I type _current_event , then it checks if the time is between 3 and 4 , and if it is , then it writes ...... , and then If the time is between 4 to 5 it types something else
how can i get each member who sent a message which was bulk deleted?
using eris btw
@hollow sedge bro I am trying to make a function , when if I type _current_event , then it checks if the time is between 3 and 4 , and if it is , then it writes ...... , and then If the time is between 4 to 5 it types something else
@acoustic veldt just use if statements to check what time it is then
@digital ibex bulkDelete should return a collection of messages, each of which should contain an author field
what ive got so far is: js for (const message of cleanMessages) { const msg = await client.getMessage(messages[0].channel.id, message); obj.user = msg.member.user.id; obj.timestamp = msg.timestamp }
oh
message.author
message.timestamp
lol
if its just an id then you cant
who knows eris
what do u need?
how do u mention the author
so like u say
!t say hi
it will reply with
Hi - @indigo flax
just
i just need the mention
message.channel.createMessage(`${whatever here} - ${message.member.mention}`)```
@digital ibex bulkDelete relies on the cache to return message information, you cant get any information on them after you delete them
eris doesnt use the message cache here at all
it just forwards you discord's response
yeah
let me see if it works
i got rid of cleanMessages which has been messing me around for a few days, so im just going to store the user, timestamp, content in my db which isnt really ideal but its my last resort
help
?
if(text == "" || text == null || text == undefined || text.includes("<!DOCTYPE")) return msg.channel.createMessage("Translation failed.");
if (text.length > 200) { return msg.channel.createMessage(text); }
msg.channel.createMessage({ embed: {
color: 0xFFFFFF,
description: emoji+" "+text
}});```
that works
but how come
if(text == "" || text == null || text == undefined || text.includes("<!DOCTYPE")) return msg.channel.createMessage("Translation failed.");
if (text.length > 200) { return msg.channel.createMessage(text); }
msg.channel.createMessage({ embed: {
color: 0xFFFFFF,
description: emoji+" "+text - ${message.member.mention}
}});```
that doesnt work
string literals
do u know how to fix it
remove the ${ }
ok

