#development
1 messages · Page 637 of 1
Easy
Really sad when this server is better with support than the official Discord.Js server...
channelname
IMO
Subtract total number of members from number of bot members
hah
okay ill try it thanks
returns as undefined @earnest phoenix
use another lang than js
I can not
Im sure some other lang will perform better in AI
JS is single thread
that fact will never change
Not always
bruh
im coding an embed maker
but its goddamn eyerape
I can make it multiple thread if i want to...
yes but thats new process
No
not js being multithread
fox.js supports new threads
Javascript is single thread but its async due to event loop
Also, i bet some kinds of JS are faster than Python
I suggest reading more about Javascript
Well, arguably its not true that Javascript is single threaded if you see from the under hood working of browser JS to your JS code, there are thread pools. By single threaded what they mean(browser end) is your JS runs into a single threaded even...
If you did not notice i am not speaking of Node
thats not node thats js in general
May i DM you?
try doing
while (true) {
console.log('1')
}
// this will never run
setTimeout(() => console.log('timeout'), 2000)
quite busy at the moment, probably you can just ask your inquiry here
That is not an inquiry, i just meant that fox.js runtime does not use any async stuff
Which lang is fastest
assembly
if you mean by fox.js doing multiple threads thats not true multithread
its just your js process doing a new process to execute that code
then return the result
Not it is single thread and not async
I know, beacuse i wrote it, please do not try to say something about fox.js unless you really heard of it
Can people provide me with some "useful" feedback on https://www.goodanime.tk and help me improve it?
Find new anime to watch the easy way.
link to fox.js?
the fact that its js and you are saying its multithread makes me doubt you
intended?
Not yet but i may post a Linux executable here
Thonk
Is that okay?
@unreal oxide how!???
Which language is fastest

@pallid zinc assembly
yur the one making it not me
What
More like why?
oh
@pallid zinc assembly is the fastest language
ublock breaks it
i would like to see some source code
How to make a listening go xx users for modmail
It give this result
uhmm offtopic things not in here
@pallid zinc https://en.wikipedia.org/wiki/Assembly_language
it floods the channel
How to make a listening go xx users for modmail
sure Tin
yes im taking a look
can i change the amount of spaces a tab inserts with nano
im not well versed in C, so i cant really judge your code. i can see you're using duktape js engine, looks like an interesting project
iirc you just put set tabsize number in your nanorc@late hill
you should have worded what you said earlier better
But i preiously used pthreads in it
I forgot that i do it no more
And i even said i did forget
pthread is more on C languages im afaik as far as I see on google
so its not js what is multithreaded
Sorry, i agree
its fine as long as the misunderstanding is cleared 
But it was underlying C that was multithreaded, so i think i am partially right but anyways, yeah, no more misunderstading
Do you use internal and external sharding combined saya?
yes
How many servers do you put per shard
3k
oh
the only difference between js and multi-threaded languages is that in js you have to implement it yourself 
Like 3k per process then?
workerthreads is avail on node.js
so its practically multithread a bit
but the overhead is still there
just less
not like in langs that is really multithreaded
Like,what langs are you speaking about?
example Java, C langs
you can use js to your ai
but you need to use worker threads
I know but node.js is too slow for it
yeah thats why just spawn worker threads
are you familiar with workerthreads?
No
a sec
Roughly, How faster do they make it?
a lot faster since you can run "separate threads"
and they can Unlike child_process or cluster, worker_threads can share memory. They do so by transferring ArrayBuffer instances or sharing SharedArrayBuffer instances.
so the overhead is less
depends on how you implement it but thats basically how you can run task in parallel
Yes.. thanks a lot
im making rock paper scissors code
as long as your machine as enough processing power for it*
but i get typeerror
yes thats a factor as well but since you are making an ai
But even if it makes it 2 times faster, fox stull overruns it, so i want to be sure it is needed
im sure you may have the beefy server you need
Yes, also, thanks for the advice
it doesn't make it any faster, it just allows you to do it in parallel, how much faster it will be will entirely depend on how well you implement it
it would be nice to know where you're getting it
likely at puts
So I'm trying to convert some go code into ruby code... here's the go code and the ruby code:
https://gist.github.com/SinistreCyborg/49151f648c52d32cc30192de6525404a
Yeah
what about fib.sum() @opaque eagle
There's a method like that?
yep
Wow
$ ruby 002/002.rb
002/002.rb:7:in `<main>': undefined method `sum' for [2]:Array (NoMethodError)```
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
idk if that's useful or not ^
your code was supposed to work with the inject
.reduce(:+) try this
@opaque eagle
Does anyone need a spam link ML model? I already asked yesterday but got abut no answers due to business
And if yes, what features should it use to judge the link?
const prefixRegex = new RegExp(`^(<@!?${client.user.id}>|\\${prefix})\\s*`);
if (!prefixRegex.test(message.content)) return;
let [, matchedPrefix] = message.content.match(prefixRegex);
``` Is there any code here that makes the entire code not work if prefix is a 2-word character string?
Curious why you needed ML for that 
Because it may make things easier in the futures...
When they start using new links
@earnest phoenix sounds like a natural language processing model if you want to be more accurate
but again, it's unnecessary, people are stupid when they spam
Hmmm... okay
I won’t be home for a couple hours, I’ll try when I get back
Force leave all servers?
loop through all of the guilds, and make the bot leave it
CODE: https://hasteb.in/cisaqoka.js
Hey my command actually works but there is still a bug. If there are more than 1 winners, someone can win several times, and I do not want that
Just make sure the user object isn't already in the winners array
How?
An if statement
Im quite having a hardtime reading that code myself
probably indent it properly first
In Line 43 - 47 the winner is selected but I have to write something that can not be selected 2 times
Can we catch up vote
probably if (winners.includes(peopleReacted[index])) continue
thats just a guess cause your code is really hard to read
Sorry, I'll test
I already told you, you can remove the winner after you add it to the winners array >.>
probably it gets duplicated 
you can try the continue method since that also ignores the users when added on winners array
In which line I should write?
but tbh idk if you will even use the var reactions or something
inside the loop ofc
If you wrote the code, it should be easy for you to figure out where to write what
My code not working idk why
Err on const youTube = new youtube();
Youtube is not define
why in line 4 YouTube('')
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
just show the code
One message removed from a suspended account.
the users
One message removed from a suspended account.
change it to members.first()
not users.first()
users is the user object
members is where hasPermission exist
One message removed from a suspended account.
How to leave the voice channel
What lib?
Lol
client.guild? yeah which guild and which channel
but if you use message.guild.me.voiceChannel.leave()
it'll work
how can I avoid the message rate limit?
you cant
you cant
like putting a timer between each message
add a delay
yes
how
you need to use a token bucket or something similar
what is a token bucket
Ideally you would use a framework that already takes care of that for you, rather than doing it yourself.
isnt there a method for adding a delay
sure, but you would probably be slowing yourself down more than you need to with that approach
@pallid zinc you may want to delete that screenshot, you exposed your YouTube api key
(As well as reset it)
Im getting a whole bunch of unhandled promise rejections for connect EMFILE discordapp.com and i dont know what i do thats causing it. I googled the error and its too many open sockets. If i inspect open sockets, my node process has 1000 sockets open to different ports on discordapp.com. I dont manually open any sockets there so it must be discord.js. What am i doing to cause this?
I dont have issues with EMFILE
so it means its not with d.js unless you did a mistake like I did before
I get more of them the more servers add my boto
are you using a free hosting with a ping script/autorestart
No im on a vps
"1000 sockets open to different ports on discordapp.com" that doesnt sound right
inside d.js
new LibDiscord.Client({disabledEvents:['TYPING_START']});
heres how i declare the client
inside d.js as in something im doing is causeing code inside discord.js to open tons of sockets
i know its inside discord.js because my code doesnt manually interact with discordapp.com
it only does it through discord.js
just listed sockets again, and i remembered wrong, theres 4096 of them not 1000
unless you are doing spoopy things
that shoudnt happen
ik, but what spoopy things are i doing
I pretty think this is more on your code
what could i do that causes this
login on a loop? 
could this happen from my .on('message') calling an async function?
mine is only 1 file xd
ik, but could it mess stuff up if u have one event working with the client and another comes in while its halfway done
would that make the socket busy or something then it has to make a new one
because i process a whole bunch of events
without a view on your code idk what bad thing you are doing
would you be willing to take a look?
but
- badly designed loops
- not breaking your loops properly
- nesting listeners and not removing them
- bad implementation of intervals
Where is the webhook creation section on the website? can't find it
if (!voiceChannel) return msg.channel.send('I'm sorry but you need to be in a voice channel to play music.');```
It's not working
The !voiceChannel think
No err
what version of discord.js are you on
11.4.2
It not sending any message even if I don't join vc
huh odd
Considering that your syntax error didn't throw an error
The code probably isn't being executed
yes
but a console.log('a') under const voiceChannel = ...
It work nice if I join vc
Lol
Hey guys, I wanted to add some sort of tracking to my bot to see how many times it is called, any ideas on how I could go about it?
every time a command is ran, increment a value in cache or in a database if you want to track it in the long term
thats what i do for bot to track usage
^ thats what i dont do
A database might be a good idea
see for me its just a counter that counts up after each reboot with simple stats like commands processed, messages received and stuff like that
If a person creates a new Discord API lib, how do they register it or what should they do?
How could I track if someone upvote my bot??
what charity do you all support
Wrong channel
sorry
That's unnecessary
Those two codeblocks are the same. You don't have to make it an arrow function.js const log = s => console.log(s);``````js const log = console.log;
or console['log'](s) if youre feeling wild :p
Rofl
anyways, gonna repost for visibility
in js what do you call a function thats defined like this in general instead of "arrow function"
const log = s => console.log(s)```
function literal?
const Discord = require("discord.js");
const botconfig = require("../config.json");
const { insperct } = require("utill");
const ownerid = "484857307369439233";
module.exports.run = async (bot, message, args) => {
if (message.author.id == ownerid) {
let toEval = args.Join(" ");
let evaluated = utill.insperct(eval(toEval, { depth: 0 }));
try {
if (toEval) {
let hrStart = process.hrTime();
let hrDiff;
hrDiff = process.hrTime(hrStart);
return message.channel.send(`*Executed in ${hrDiff[0] > 0 ? `${hrDiff[0]}s` : ''}${hrDiff[1] / 1000000}ms.*\`\`\`javaskript\n${evaluated}\n\`\`\``, { maxLength: 1900 });
} else {
message.reply("Error: kann nicht ohne args was machen....").then(m => m.delete(5000));
}
} catch (e) {
message.channel.send(`Error whilst evaluating: \`${e.message}\``);
}
} else {
return message.reply("Diesen command kann nur der Owner benutzen").then(M => m.delete(100000));
}
};```
rror: Cannot find module 'utill'
?...
util not utill
how to define .tag?
Channel.send(`${member.user.tag} joined using invite code ${invite.code} .`)
TypeError: Cannot read property 'tag' of undefined
_ _
yea you have quite a few typos
member.user is undefined
that happens because member is probably the wrong value

show surrounding code
can be replaced member to client and it will work ?
yes but it will always show your bots tag
client.user is your bot lol
i forgot xD
show the surrounding code
on priv
i need some help tring to figure out how to make a hello/goodbye in embed for js
why not here? dw nobody is stealing or judging
as you wish
if its a huge block, use hastebin
nah i do somethink like inviter menager
...? just show me how you defined member
const channelID = 'someID :P'
const invites = {}
const wait = require('util').promisify(setTimeout)
client.on('ready', () => {
wait(1000)
client.guilds.forEach((g) => {
g.fetchInvites().then(guildInvites => {
invites[g.id] = guildInvites
})
})
})
client.on('guildMemberAdd', member => {
member.guild.fetchInvites().then(guildInvites => {
const ei = invites[member.guild.id]
invites[member.guild.id] = guildInvites
const invite = guildInvites.find(i => ei.get(i.code).uses < i.uses)
const inviter = client.users.get(invite.inviter.id)
const logChannel = member.guild.channels.get(channelID)
logChannel.send(`${member.user.tag} joined using invite code ${invite.code} from ${inviter.tag}. Invite was used ${invite.uses} times since its creation.`)
})
})
all work just this .tag not
hmm that should work
but not working bc still is TypeError: Cannot read property 'tag' of undefined
ohhh maybe its inviter.tag
Is it really member.user
just use invite.inviter.tag
so not .id ?
invite.inviter is already a user
you dont need to search for them with client.users.get()
if invite.inviter is defined then you can just that to get the tag
const inviter = client.users.get(invite.inviter.tag)
and then just ${inviter} ?
this will work unless the invite doesnt have an inviter (which isnt a guaranteed property according to the docs)
lol
no your program
notepad++ xD
k
console.log(invite)
@idle basalt so how to make it working ?
i have to go, but im sure someone else can help you. if theres nobody here you can try the d.js server
sorry i couldnt finish

@icy matrix what did you need
look up
i create simple invite menager
but
.tag not working
all without it works
so idk
@icy matrix normal

try message.guild.members.get
why message ?
or predefine the guild and dont use message
Isn't it guildmemberadd event
oh
stop links
@icy matrix member.guild.members.get
edited
Can someone help me with discord.js quick.db?
What's quick.db
a database
I would guess it's like enmap
Yeah I looked it up lol
It's pretty much like keyv or enmap
Except it's bad cuz it doesn't have a strong community behind it
Do you know how to use it tho?
No why would I use that stuff rofl
Can anyone explain how to make a unban command in discord.py please?
@potent wagon I don’t use py but I found this.
Lemme check
I don't use py either and I found this: https://discordpy.readthedocs.io/en/latest/api.html?highlight=unban#discord.Guild.unban
I think I know how to do it
Cool
let prefix = "M!"
let messageArray = message.content.split(" ")
let cmd = messageArray[0];
let args = messageArray.slice(1);```
let messageArray = message.content.split(" ")
^
ReferenceError: message is not defined
show your message event
D-;
?
bot.on("message", async message => {
if(message.author.bot || message.channel.type === "dm") return;
})
let prefix = "M!"
let messageArray = message.content.split(" ")
let cmd = messageArray[0];
let args = messageArray.slice(1);
let commandfile = bot.commands.get(cmd.slice(prefix.length)) || bot.aliases.get(prefix-length)
if(commandfile) commandfile.run(bot,message,args)```
missing ;
you closed your message event
after split
@earnest phoenix js doesnt care
oh
pull.config.aliases.setImmediate(aliases, pull.config.name)
^
ReferenceError: aliases is not defined
fs.readdir("./commands/", (err, files) => {
if(err) console.log("konnte keinen ordner mit dem namen commands finden")
console.log(err)
let jsfile = files.filter(f => f.split(".").pop() === "js")
if(jsfile.length <= 0) {
return console.log("KONNTE KEINE COMMANDS FINDEN |")
}
jsfile.forEach((f, i) => {
let pull = require(`./commands/${f}`);
bot.commands.set(pull.config.name,pull);
pull.config.aliases.setImmediate(aliases, pull.config.name)
});
});```
Hey, could someone explain me what's wrong with this line? ^^
mod_chan = yield from discord.utils.get(message.guild.text_channels, id=mod_channel_id)
TypeError: 'TextChannel' object is not iterable
wtf
@peak quail aliases is not defined
i already said that -_-
@lyric hawk wath is discord utils
Oh yeah figured it out
Should have removed the yield from
discord.utils is not a corountine
👌
@earnest phoenix
can tell u rn he just doesnt know discord.py and thought it was something else but 👀
Anyone know quick.db and discord.js There is some type of error in my code but I cant find it.
error message?
no
The command just dont work.
Like it should.
Pretty much half of use know Discord.js and if you still need help with quick.db ask
Me
Although it is pretty simple...
Can you just look at the code and see if you see anything wrong?
Sure
Hello, I would like to retrieve a server ID through the guildDelete event, more generally, I would like to simply retrieve a server ID before the server disappears, would you know how to do that? (Discordjs as library)
What do you mean, can you develop?
lol wdym
if you dont know what youre doing then you need to figure it out yourself
thats all you should need to know and if it isnt you need some time to yourself to actually learn the lib
The guildDelete event gives you the deleted guild object which has an id. I highly doubt the event fires before the guild is actually gone though
djs still has it in its collection, it deletes it after the fact
you just wont be able to make any api calls about it
the api only sends the id in the payload anyways, not like you can do much with that
i've been trying to figure this out all day (discord.js) <https://glitch.com/edit/#!/hickory-yarn?path=server.js:60:3>, <https://discordapp.com/channels/264445053596991498/265156322012561408/590351781725339684>, i'm using glitch since i can't remember my github login nor is hastebin working properly
< > your urls if you can so they don't clog up the chat btw
my bad
let me give an explanation
since last night we we're trying to make the bot recognize both our ids since we're it's developers
[id1, id2].includes(message.author.id)
problem is that whenever I tried to work with )eval2 it would send the evaled message and the return message at the same time
that code
So how can I get around my problem with guildDelete?
we told you
is literally 2 message listeners with extremely similar code
Well
and if you dont understand learn yourself
because we arent here to baby you through every simple thing
on your eval command being called, do if(![id1, id2].includes(message.author.id)) return message.reply(ur deny message)
why if (evaled.includes(client.token))
if it includes client.token, it will literally send the bot's token
If you think you'll actually accidently eval client.token
Just don't even create an eval command then lol
fun fact
smh
you can manipulate strings
^^
^ lol
If a random user gets access to your eval command, that check is useless.
you should just, make sure they dont have access lmfao
exactly what if(msg.author.id !== config2.ID) return does
Jesus Christ we can't explain ourselves correctly without it being worse
libraries that directly expose the token in a prop are dumb, change my mind
that's for later on
the token's been inputed already and is known, there's no reason to keep it exposed in a public prop
and infact i actually use client.token often for making raw requests myself smfh
i told u exactly how to do it so easily but ok
ok
Literally just remove the second message listener and change one line of code in the first one
I will try what you said

we both have access to the same code in a private call
imagine not using gh
that's
Also just from the looks of it
If you're using one message listener for each command atm
Please change that
There's no reason for that
setTimeout(function() {
const kanal = client.channels.get('590346893398245377')
kanal.send('Her gün 18:00'da: Günlük eventler ve Her Cumartesi 20:00'da Dev event!')
}, ms(1080000));
Error: 'send' undefined
- That's definitely not what the error said word-for-word... don't try dumb down the message next time.
- Make sure that channel exists.
It most likely said Cannot read property send of undefined
Cutting an error helps no one
@uneven pond
What
other languages in #memes-and-media please
More problems in trying to convert Go code to Ruby code...
https://gist.github.com/SinistreCyborg/076034a36e2ee96435ca9bfe864f41b2
Basically the code is trying to find the largest palindrome number that can be formed by multiplying two three-digit numbers.
Interesting observation: both the go code and the ruby code output palindromes... that imo means I'm not stopping code execution when I should, since the result decreases with each iteration (the counter counts down: x -= 1 y -= 1)
how do you .toLowerCase
What's ur question @shy turret
nvm, someone just gave me code lol
while x > 0
x -= 1
while y > 0
y -= 1
p = x * y
a = isP(p) && p > a ? p : a
end
end```
you decrement them before running the loop's code
move the -= 1 to the end of their blocks
for A; B; C {
D
}```is equivalent to```go
A
while B {
D
C
}```
if(!voiceChannel){message.channel.send('i am not in a voice channel')
}else{
message.guild.me.voiceChannel.leave
.then(() message.channel.send( 'successfully disconnected')}```
it's only sending I am not in a voice channel
what is voiceChannel
hey, i need some help with finding a channel type?
get the channel then look on .type property
ik this is wrong but
if(member.guild.channels.find("name", "join")== null)return; else {
if(member.guild.channels.type == 0```
why ur code look like that
learn to indent your code properly and you wont have so many issues lmao
cuz a tab changes the code
then make it not do that 
learn to use eslint as well
problem on your indents solved
- it helps you avoid bad practices
if (!member.guild.channels.find(...)) return;
// no need for else
it literally does
it makes your code clean, so you can actually read and understand why it's not working
Oook
Jpb voiceChannel is defined as mesage.member.voiceChannel.join()
how are you defining it
var voiceChannel = mesage.member.voiceChannel
can you take a screenshot of all the code lmao
i wouldn't have a clue dude
so you are on a mobile device coding
U can say
its a yes or no, it wasn't a trick question
I think their mirroring the pc to a tablet
then dont do that
because that's only going to make doing anything absolute hell and constantly asking here for help when you're only making it harder for yourself is wasting peoples time
]]useful_js_debugging
you want ss or writren code
I want you to read what i sent and click the link and also read that
done
you did not read it
ok
literally half of all the messages you've sent in the server were in this channel
surely you could try and learn for yourself instead of relying on others to constantly fix your code
if you have a problem and it keeps happening, google it or learn how to not have that error to begin with
ok
i have a question ...
I want my bot to start recording my voice whenever i speak in that channel and then convert that into .wav file.
How can i do this ? any help is greatly appreciated.
Bots dont ofically support receiving Audio
Make it record incoming sound idk how tho
@split lantern but there is a bot that does that idk how
here is that bot page https://craig.chat
There is an git issue on dapi for voice receiving
if you are using discord.js you could use a VoiceReciever
https://discord.js.org/#/docs/main/stable/class/VoiceReceiver
its complex men
is there any example code ?
no men, read docs
discord.js documentation is the best ive ever read
hello
nothing really, but lets keep this channel related to development
I saw there is is an other option for library, does that mean i can use a custom one or not?
Okay, thanks for the answer
Not directly related but may libCURL and libwebsockets interfere?
Hello, someone knows why my bot can't get user id properly? Seems like it usually gets with no errors, but sometimes the result is just "null"
nope, it gets id only from servers, also I noticed it returns null when some user sends a message on my server
member isn't in cache, aka you need to request a download of all members
or you can request to get a specific user, dunno how in other libraries though
oh it worked thanks
Not related but what do i do if all the media on Discord has error 502
In the client
And it states that Bad Gateway is me
5xx is a server side error, you can't do anything about it
the cdn just had a stroke
Yea can confirm image proxy is being a derp right now
Oh, okay, thanks, i knew it is server side but it explicitly stated that it was my problem, thanks for the explanation
Does anyone know any ip pullers
mate are you serious
we tell you whats wrong about them, and then you literally ask in the same server but a different channel
Heya, if i am making an API which requires some data, should i rather use the data section or headers for getting it?
The amount of it may vary but not much usually
query string if you want
Hmm, thanks, do you mean query parameters? I am still a newbie with this
are you familiar with query string?
Oh, sorry that was just my misunderstanding
Like /search?q=hellothere
Yeah, thanks, understood, it's just that my English is not that good
@sand crown .png
@alpine heath how old are you
Yea
@sand crown the splash background need to be a image
don't waste my time, idfc
lmfao
how do I upload it as a ".png" file to discord? Doesn't it get converted to a jpg?
ok, someone's being toxic
Just take a normal Image
jpeg jpg or png
or apng
You need to get your Server to 25 boost
you can define it in the server settings
Hello 😃
Who used npm fortnite?
I need help, and nobody help me. I asked to the creator, but he says ask to another person
It seems a pretty simple one, what is your problem?
why on earth would the creator ask you to ask someone else...
why would he waste time trying to explain how it works to someone who obviously has no idea of what they're doing
ins't good creator
fortnite.user('username', 'platform [pc, xbl, psn]').then(console.log);
fortnite.store().then(console.log);
fortnite.challenges().then(console.log);
This insformation are in the npm information
No, if you put it in the code, don't do anything xD
Do you need a lot of things to do it
What code did you put in?
What things?
What do you want to do?
I need more information of npm fortnite
what else do you need
Look at its source code then
It don't have
provide context, you keep saying the same thing over and over again but rephrased
and the creator block me xD
the package is on github but ok
Did you get an api key from fortnitetracker?
Because maybe it doesn't have permission to use @ everyone?
it have.
KefToday at 3:07 PM
Because maybe it doesn't have permission to use @ everyone?```
it would still appear as a mention, just it wouldn't ping
bot have admin perms
i presume you're using d.js; there's a setting in the client to disable everyone, set it to false
do you just need to mention everyone or do you actually have to access the role
Nvm, I fix it.
math.eval probably uses a specific syntax aswell as what tim said
Eval have renamed to evoluate
In 6v
That way err
But still
It say undefined symbol math
args.slice(1).join(' ')
Ok
const mathEmbed = new Discord.RichEmbed()
hmm, i have still the same error, happens very rarely and bot can read a lot of user ids
@earnest phoenix it returns a Member object which doesnt have an id. to get the id you need to use wUser.user.id
im fairly sure member objects do have IDs
when i tried it like 2 days ago it didnt work with that
message.guild.members.get(message.author.id) or let wUser = message.member
Im tryna find the smallest positive number that's divisible by all of the numbers from 1 to 20```rb
#!/usr/bin/env ruby
def evenlyDivisible(n)
(1..20).each do |a|
if n % a != 0
return false
end
end
return true
end
i = 1
until evenlyDivisible(i)
i += 1
end
puts i```
The code just runs infinitely
hmm ok, so I changed to wUser.user.id, seems like it didn't read only few members, weird
I get a similar error in py when running for 30+ hours without a code restart
Though if it gets spammy I just remove the warning error completely

message.server is None if message was sent in DMs.
Yeah, Add something to check type.
:(
Idk any ruby so cant help you eslint.
Nvm I'm dumb, I realized ruby has some cool shit by default: rb #!/usr/bin/env ruby puts (11..20).reduce(1, :lcm)
Although would that be considered cheating?
Others r taking some elaborate ways to get there
Wtf is cheating in programming
Idk that seems too easy
There's just multiple ways to take care of a problem
Those who chose JavaScript for these challenges r suffering
@slender thistle it checks for messages with symbols, then checks server
So it's very unlikely there are 10 "!" in one of my bot's dm(s)
I saw that
Stay in #memes-and-media thank you @white brook
Checking for msg.server works just fine
Doesn't matter
hi
i love how that screenshot doesnt show neither the error or the code itself
there is no such thing as messageEmbed, and its not even a constructor
const mathembed = new Discord.RichEmbed()```
just because you copy paste a small bit of code you see in a fucking video doesnt mean it will work
Or he using a old version of discord
Now it give err at const mathembed = new discord.richEmbed()
you cant even copy and paste properly omg
He said he defined discord with a small d
RichEmbed would still have to be written like that
Why don't u get home first and code on ur computer
That would make the biggest difference on ur code rn
and using a proper code editor
It was coded on pc only
Because its year 2035, computers do not exist anymore, people only have phones /s (sorry for shitpost)
Go home first and log onto ur computer... code there on an IDE like vscode, atom, webstorm, sublime, vim, etc

Hi, I have an question... Can I get the ID of a server before leaving it, in the "guildDelete" event?
Library: "DiscordJS"
vscode, atom, sublime and vim are not IDEs by the way
not before leaving it, as the event is emitted after the guild is already "deleted"
Okay, thank you for the fast answer @mossy vine =}
i dont know if this would be a general discord api question or a discord.js question, but what even is a guild integration and why does d.js emit an event for it when the Guild object it passes doesnt even have any integrations-related property according to the documentation
ik i wrote webstorm and vim first that's why I said ide
then i added in the rest with the edit
but i forgot to change "IDE"
@mossy vine
oh, that
but why is there an event for it if the Guild object has no properties related to that
I made slight changes to https://www.goodanime.tk if anyone is willing, could you please let me know if there is some way I can improve this even further?
Find new anime to watch the easy way.
cyber, i've got no idea. d.js attempts to map the entire api regradless if it's for bot use or not, i guess they missed that
probably because integrations are rarely used
likely
@quasi forge the font is not casually readable
It's not supposed to be lol.
it isn't user friendly, which is bad if it's supposed to be a service
could you give examples of where the font was not readable enough
I was recommended this font by others
@earnest phoenix
everywhere imo
it's the kind of font you'd use to toy around, not use it on an actual website
i'd recommend using roboto/open sans/ubuntu instead
Error: 401 Unauthorized help pls
Invalid token
dbl token or bot?
DBL one if you are getting that error when sending a request to DBL
Do your want your prefix to be "dany"?
Yea
Sure
Right. You can set your prefix to "dany" by putting command_prefix kwarg in its parameters
Is that yours
It's your bot? @earnest phoenix
@earnest phoenix
Go to their supper server
^
So, what's the problem? If it is not related to development, we should move to #general
Not while listening to animu
Why Koya is offline on my server
Ask in its support server
not our problem @urban lark
ok ok ty
Useless
We cant help with it
noU
They left anyway


same error :/
What error
@earnest phoenix
I reseted but not working dbl token
401 Unauthorized
Invalid token
But true!
True token but not working
So i need to type "command_prefix kwarg"?
yes
Not literally
And honestly, read the docs https://discordpy.readthedocs.io/en/latest/api.html







