#development
1 messages · Page 788 of 1
require("requests")(url).on("data", (chunk) => console.log(chunk))
i'm used in eval, result: { run: [AsyncFunction], conf: [Object], help: [Object] }
But i'm use this code in commands and have a err
require("../user/ping.js")
Err = cannot find module
the file path is wrong
Is require relative to the file the require was called in or the root program file?
Command path and eval path is equal
@modest maple the project is a 1man proj and is for my first year of informatics on high school. (5th year)
The general idea is that the arduino will send a POST request to the REST API when the PIR sensor gets triggered.
Then you can view all the requests and data from a UI on ur pc.
Well, thats my project. My class mates have that they can turn a light on true a website that is hosted on the arduino.
noice
Mine might be the guy she tells you not to worry about meme, but my project is that guy.
lmao
@amber fractal in the same path
I see different files tho
Yes different files. But in the same path
I was thinking that was something different
Can you show me the file tree regardless?
where is the file that you have require("../user/ping.js") in that creates the error
app.js?
in dev category @amber fractal
Oh
red... and ret...
How
+1
@zenith orchid try console.log(require.resolve("../user/ping.js"))
Return /app/commands/user/ping.js
in eval or in the commands?
in command and eval
Yes
are you on glitch?
Yep
Py is not supported in glitch.
You sure about that?
https://glitch.com/~flask-python3 (not mine)
Wtf
Glitch can run a lot of things
people just use it for discord bots even though its meant for web dev
True
glitch can be used for python
altho not advised
but then again glitch isnt advised at all
I heard first time
Discord.js
Is there a way to make an 'infinite' reaction collector? I want the user to be able to keep clicking reactions and have the message edit and there is no end to it. But the only working way that I know is to have hundreds of lines of code and eventually it will end. I've been trying for a while and haven't found out how to do it.
Ping with response, please.
How can I check if someone has a higher role than someone else, for example when using the kick command?
Im trying to install dblapi.js and cleverbot-free but something with them are uninstalling eachother when I install one
like
install dblapi
install cleverbot > uninstalls dblapi
and vise versa
idk whats going on
@summer torrent Not what I mean. I have a bunch of awaitReactions and if else in my code.
@floral bloom use the messageReactionAdd event lol
store data as variables in the client object or somethijg
then access them in the event
im getting this using tweepy and honestly, idk how to fix it.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/usr/botv2/cogs/twitter.py", line 135, in blocked
for block in api.blocks():
File "/usr/local/lib/python3.6/dist-packages/tweepy/binder.py", line 250, in _call
return method.execute()
File "/usr/local/lib/python3.6/dist-packages/tweepy/binder.py", line 191, in execute
six.reraise(TweepError, TweepError('Failed to send request: %s' % e), sys.exc_info()[2])
File "/usr/local/lib/python3.6/dist-packages/six.py", line 702, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/dist-packages/tweepy/binder.py", line 189, in execute
proxies=self.api.proxy)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 519, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 462, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
tweepy.error.TweepError: Failed to send request: Only unicode objects are escapable. Got <generator object to_unicode.<locals>.<genexpr> at 0x7fca7813a1a8> of type <class 'generator'>.
Never had it before.
@floral bloom recursion exists
const prefix = "c.";
if(!message.author.bot) return;
if(!message.guild) return;
if(!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix.length).trim().split(/ +/g);
const cmd = agrs.shift().toLowerCase();
// c.say hello my name is stan
// say
// [hello, my, name, is, stan]
}
if (cmd === "say") {
if (message.deletable) message.delete();
if (args.length < 1)
return message.reply("Nada a dizer?").then(m => m.delete(5000));
const roleColor = message.guild.me.displayHexColor === "#0c0c0c" ? "#e51515" : message.guild.me.displayHexColor;
if (args[0].toLowerCase() === "embed") {
const embed = new RichEmbed()
.setColor(roleColor)
.setDescription(args.slice(1).join(" "))
.setTinestamp()
message.channel.send(embed);
} else {
message.channel.send(args.join(" "));
}
}```
this code is right and wrong at the same time if somebody knows how to fix i will be happy
its not this :/
@quartz kindle Hm?
more like
then you need to fix the syntax
if a new problem appears, that means the problem is fixed lol
you cant just not fix a problem to prevent another one from appearing
yes i solve one to surge other
yes, and then solve the other too
@floral bloom you dont need hundreds of lines and if elses of repeating code
use recursion
@floral bloom js async function reactions(message,page) { let m = await message.edit(page); let r = m.awaitReactions(someFilter); reactions(m,pages[r]) }
edit message with page then await reactions then run itself again
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/usr/botv2/cogs/twitter.py", line 135, in blocked
for block in api.blocks():
File "/usr/local/lib/python3.6/dist-packages/tweepy/binder.py", line 250, in _call
return method.execute()
File "/usr/local/lib/python3.6/dist-packages/tweepy/binder.py", line 191, in execute
six.reraise(TweepError, TweepError('Failed to send request: %s' % e), sys.exc_info()[2])
File "/usr/local/lib/python3.6/dist-packages/six.py", line 702, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/dist-packages/tweepy/binder.py", line 189, in execute
proxies=self.api.proxy)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 519, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 462, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
tweepy.error.TweepError: Failed to send request: Only unicode objects are escapable. Got <generator object to_unicode.<locals>.<genexpr> at 0x7fca7813a1a8> of type <class 'generator'>.
how to fix ;-;
Hmm, I'll try it.
help me tho :<
i dont python
aaa
@rancid nymph you need to fix your brackets
for every { you open, you need to have a } to close it.
i know
your code is either missing closing brackets or you have too many of them, or in the wrong places
going to see that
you shuold also fix your code's indentation
you can simply copy and paste your code into some js beautifier/formatter
it will make it much easier to see where the problem is
channel = author.voice.channel
vc = await channel.connect()
guild = ctx.guild
source = discord.PCMVolumeTransformer(
discord.FFmpegPCMAudio("tts2.mp3")
)
sound = vc.play(source)
No errors, but it doesn't play the file.
am I doing something wrong?
how do i reset every single db that existed in quick.db?
do i foreach and then delete them
delete the db.sqlite?

Or whatever it's called, json.sqlite.
["command"].forEach(handler => {
require(`./handler/${handler}`)(client);
});
TypeError: Cannot read property 'forEach' of undefined Im getting this error for this block of code
any idea why?
["command"] is undefined
welp idk how to fix that
what are you trying to do in the first place
Yea you probably should not code with a dead brain then 
True, but I wanna get this done before this weekend 
hi I'am write XP system to SQL message.memeber.id or message.author.id
con.query(`UPDATE **** SET xp='**', lvl='**' WHERE id='${message.member.id}' `)
con.query(`UPDATE **** SET xp='**', lvl='**' WHERE id='${message.author.id}' `)
author or member ??
author
if you just want the id you don't need the member object of the message author
since that doesn't include the id execpt you do message.member.user.id
only the user has the id
@earnest phoenix ^
help meee ```js
con.query(SELECT * FROM globalxp WHERE id = '${message.author.id}', (err, rows) => {
if(err) throw err;
let sql;
if(rows.length < 1) {
sql = `INSERT INTO globalxp (id, xp) VALUES ('${message.author.id}', ${xpadd()})`;
} else {
let xp = rows[0].xp;
sql = `UPDATE globalxp SET xp = ${xp + xpadd()} WHERE id = '${message.author.id}'`;
}
con.query(sql, console.log);
});```
when i get xp then i don't rewrite the current xp met but simply write it to the current xp
for example: my xp 20 and i get 30 xp that sql 2030 writes like this and shouldn't
I should add the two values and that would be my new xp
@west spoke shouldn't you await the play?
Every video is unavaible with ytdl-core, why? (djs v12)
ask in ytdl supoort
Y nit
hm it works for me tho
Python people (I tried the entire first page of google and nothing worked) I'm getting this error WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available (Python 3.7.6)
This is when trying to install numpy (I was getting a ModuleNotFound error while attempting to import it)
windows or linux?
that was for steven lol
i cant help you denis, if you dont provide more information, what is the error?
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/app/server.js:36:15)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)```
there is no problem in a module all of this has happened on the line
pnpm i modulname
I do and I think it is improving
@quartz kindle
@amber fractal are you building python from source?
If by that you mean I used the tarball then yes.
well, from what i understood, its a version mismatch between the system's openssl/libssl and python's requirments
try installing a newer version of openssl
.
When I ssh -V returns OpenSSH_7.2p2 Ubuntu-4ubuntu2.8, OpenSSL 1.0.2g 1 Mar 2016
I'll try it tho
try this
Recently I was configuring Python on a fresh Ubuntu server. The environment I was in required me to install Python 3.7 from source. Easy enough, I found Mani...
Will I need to uninstall my current python 3.7 ?
i dont think so
Also, I've been having another issue. Every new terminal I start I need to source /etc/environment for any commands to work, so I must've messed up my env variables, but I have no idea how to fix that
welp, i found this
One thing you are mistaken about is that /etc/environment requires a reboot to reload. This is incorrect. The only time the file is read is on login, when the PAM stack is activated – specifically pam_env.so, which reads the file.
Logging out and back in would apply the changes – and in fact you must do this if you want all your processes to receive the new environment. All other "solutions"2 will only apply the environment to the single shell process, but not to anything you launch through the GUI including new terminal windows.1
@ruby talon I tried that
Sir
It says "NoneType cannot be used in await statements"
Where do I put my veneration. Code
what
Leo, do you mean your bot token?
am i the only one having issue with vote webhook ?
Or are you looking for help with a bot that you added to your server?
Yes
You are on the wrong server, we are not a support server
I can't verified
@flat pelican could we get a -wrongserver
-wrongserver @sly bone
@sly bone
Hey! We think you have our server mistaken. We do not provide support, help, or advice for any bot. You need to click on the "Support Server" button on the bot's page, not the "Join Discord" button at the top of our website. If there isn't a button that says Join Support Server, then we can't help you. Sorry :(
No more pokecord xD
honestly I thought pokecord was more relevant cause it was always breaking
who changed that image to Luca xd
Luca's support server is here
people will be like: "oh luka? sure... tf its the same place"
how can i replace @everyone role name inmember.highestRole code? I just tried .replace('@everyone', '') but not worked..
what are you trying to do?
@west spoke shouldn't the author callback be ctx.author.,,,
Wdym
channel = author.voice.channel
vc = await channel.connect()
guild = ctx.guild
source = discord.PCMVolumeTransformer(
discord.FFmpegPCMAudio("tts2.mp3")
)
sound = vc.play(source)
@west spoke from where do you retrieve your author obj?
author = ctx.message.author
I'll try it without the message
but it connects just fine
Ait.
though it just doesnt play the audio file
I'm currently on mobile tho, so its pretty hard to read.

@quartz kindle you're a legend thanks
voice = get(self.bot.voice_clients, guild=ctx.guild)
voice.play(discord.FFmpegPCMAudio(f"{url}"))
voice.volume = 100
voice.is_playing()
@west spoke
Does it need to be a url?
no
Ok
that was taken directly from my stream command
it should work
How can i make a ?sayEmbed command - send me source code if possible :D
would my vc object be the same as your `voice object
@digital fjord no, we aren't going to spoonfeed code.
@digital fjord we aren't spoon feeding here.
a simple google search will get you what you need
Nah, i have tried.
it is literally on google
Have you tried looking at the docs
^
What docs?
I am guessing you are using js
embed object -> title = (string: content stripped from say)
Yeah, js.
Is it that one?
Depends
yes
They are using js
Didn't see the message
they want people to give them the code
Long live discord mobile.
@west spoke Have you tried my code
im doing that now
I really wanna know, how can i find out how to do it. That's my only question. Because i'm new to this - and im not good at english eather.
are you decent at coding?
Who
you
no idk
i only do minecraft coding lol
wdym Minecraft Coding
Define, minecraft coding.
Ya
Java wrapper for the popular chat & VOIP service: Discord https://discordapp.com - DV8FromTheWorld/JDA
Java wrapper for the popular chat & VOIP service: Discord https://discordapp.com - DV8FromTheWorld/JDA
can you show me the code
Can it see the voice channel
im only a little dumb ok
channel = ctx.message.author.voice.channel
I defined channel as this
message.author is you
oh
yeah
i think it's trying to play
but it cant
?
it now plays the file, but without any sound (seen by the green indicator)
like it stops "playing" but no sound is outputted
channel = ctx.message.author.voice.channel
if not channel:
return
try:
voice = get(self.bot.voice_clients, guild=ctx.guild)
if voice and voice.is_connected():
if voice.channel == channel:
pass
else:
await voice.move_to(channel)
else:
voice = await channel.connect()
except:
pass
that is the start of my play
I get error when using meme command. Sometimes it works, but sometimes i get this:
thank you
but peter, it has no problems connecting, and I don't need it to disconnect/reconnect, as this is going to be a text to speech thing
but the problem is
it doesnt play anything
does the file exist
yes
yes
no, .wav
have you called it tts2.wav
have you imported:
from discord import FFmpegPCMAudio, PCMVolumeTransformer, AudioSource
it is 0 seconds
I just call discord.FFmpegPCMAudio
wdym call
damn
fine, done.
bruh is that python then
yes
stfu
why do you even need ffmpegpcmaudio
tf
Neko have you tried again?
i mean python can handle .wav natively
what bullshit does discord in python even use
yes peter
no its not
it really is
in discord.js you dont even require ffmpeg from discord.js

Instead you require ffmpeg from ffmpeg
you dont need to import it, you can do discord.ffmpegpcmaudio
or whatever dependency discord.js has optional for audio
now if you are going to meme, leave
@earnest phoenix Leave or I get a mod
read the topic mate
you are not helping
ok
...
you are making fun for us using python
Nope
3c? oho
Im not making fun of anything
bruh..
no im not
leave
Some guy named JensToday at 14:56
in discord.js you dont even require ffmpeg from discord.js
:lmao:
Instead you require ffmpeg from ffmpeg
just leave
Some guy named JensToday at 14:56
what bullshit does discord in python even use
Some guy named JensToday at 14:55
why do you even need ffmpegpcmaudio
bruh
i can make one rq
Please do
at the moment, and the discord.ffmpeg* is now just ffmpegpsmaudio
something i cant spell rn
it is now discord.FFmpegPCMAudio?
'
what
though like i said, there's no difference
voice = get(self.bot.voice_clients, guild=ctx.guild)
That is not what I am doing
fair
that can be used for joining/leaving channels but also to play the audio
mk
voice.play(discord.FFmpegPCMAudio("tts2.wav"))
its a .wav, though does it need to be a mp3?
didnt read it
its fine
ah
that is all that is needed
though when i do the get() part as vc
but yeah, now when I put in for it to either get the vc or join (if not in one already) then it comes back to the same problem
no sound
user volume is full, and the .wav file exists and has sound.
show code
alright, now what
vc.play(discord.FFmpegPCMAudio("tts2.wav")
though that's the same thing, is it not?
just using a variable instead of the function in the same line
thats literally the same, but ill try it
same thing
no audio
then define it as self.bot
alright
if connected, go to the same voice channel.
(though when I use that, it says play is not a function of NoneType)
you don't even need to put it as a try and except it can work in one go
lemme use your previous code rq
ok, now I have it using your previous code
but same problem, as usual.
no audio
show what you did
please help me ```js
con.query(SELECT * FROM globalxp WHERE id = ${message.author.id}, (err, results) =>{
if(err) throw err;
if(results.length === 0)
{
con.query(INSERT INTO globalxp (id, xp) VALUES ('${message.author.id}', ${randomXP()}), err => {
if(err) throw err;
console.log("added XP database!");
});
} else {
con.query(`UPDATE globalxp SET xp = ${results[0].xp + randomXP()} WHERE id = ${message.author.id}`, err => {
if(err) throw err;
console.log("UPDATE XP users!");
})
}
})```
ű
xp BUG
just type it at the next value
when you should add it
confused
also you do WHERE id = ${message.author.id} (integer) but do ('${message.author.id}' (string), maybe that has something to do with it
I don't quite understand what you're referring to
what type is id supposed to be, a big int or string?
ids must be strings
although you can use bigints as well, but then you need to convert them back and forth everywhere
hello
putting quotes around user ids doesnt really matter because they are already strings
anyway, what is the problem again?
con.query(`UPDATE globalxp SET xp = ${results[0].xp + randomXP()} WHERE id = ${message.author.id}`, err => {
if(err) throw err;
console.log("UPDATE XP users!");
})```
you should add xp, but just write it next to it
what is randomXP()?
function randomXP()
{
return Math.ceil(Math.random() * 25);
}```
than your xp saved as a string
yes
need to be number
int? or bigint
yep
but javascript can only handle numbers up to 48 bits iirc
without using bigint syntax
help js let nxtlvl = results[0].lvl * 30; if(nxtlvl > results[0].xp){ con.query(`UPDATE globalxp SET lvl = ${results[0].lvl + 1} WHERE id = ${message.author.id}`, err => { if(err) throw err; console.log(`LEVEL up! NEW LEVEL ${results[0].lvl}`); }) }
ez annyi lenne ha elérem egy 30 xp akkor szinttel feljebb történetesen nem történik semmi
even when it reaches 30 xp, it does not print the log
is it in your message event?
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)10:44 PM
at Function.Module._load (internal/modules/cjs/loader.js:508:25)10:44 PM
at Module.require (internal/modules/cjs/loader.js:637:17)10:44 PM
at require (internal/modules/cjs/helpers.js:22:18)10:44 PM
Jump Toat Object.<anonymous> (/app/src/main.js👍91)10:44 PM
at Module._compile (internal/modules/cjs/loader.js:701:30)10:44 PM
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)10:44 PM
at Module.load (internal/modules/cjs/loader.js:600:32)10:44 PM
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)10:44 PM
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
install the module
npm i kurasuta
Done
do you know if it's possible to do something like a shard where only a list of guilds can be in ?
in discord.js
okay
const userid = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));```
only ID
how?
userid = (message.mentions.users.first() || client.users.get(args[0])).id;
but keep in mind that the args[0] will fail if the user is not cached
can also be message.guild.members.get(args[0])
same thing, but client.users is shorter
Hey, i have a really complicated question in my own opinion, How can i use my bot to log stuff to an file such as a database file
My situation
I am on a flight sim server and the ATC's log themselves when they are Active
username
callsign
minutes active
How can i make a command that takes that info and stores it into a databse?
your bot receives everything as messages
make it filter the messages to make sure its the ones you want, by channel or by message author for example
then store those messages by calling a database function or something
ngl is satisfies me when efficiency is at its finest
after some stress testing with a friends site
we can scrape 5 pages a second
😅
performance > all
npm rebuild
So... my bot posts a message whenever it joins a guild, like a how to message. How do I go about having it not post a second time if the guild is to go down? Do I have to save it to a database or something, so that the bot doesn't post again?
I never expected to have this issue.
pretty much
Yeah, a DB is the easiest way I think
or simply put your "how to" in a help command instead
Good idea. Thanks guys. 🙂
My bot sends a DM to me when it gets added to a new server and it checks the database to make sure it isn't added to a guild yet
I think someone talked about using guild channels as DB tables a few days ago? xD
Interesting. I'll have to think about it.
sure why not
frog, dont think about it in a serious way 😛
but it might be something fun to think about sometimes

since bots cant search messages, you could make a database guild where the channels are named after a message id in them
And I think there is a limit of 100 channels in a guild?
let joined = new Promise(async r => {
for(let channel of guild.channels.values()) {
let list = await channel.messages.fetch(channel.name);
if(list.includes(newGuild.id)) return r(true);
}
return r(false)
});
lmao
It would be a very great wya to save passwords
#changemymind
you could use a few channels to hold a message of indexes
then you can have multiple messages in each database channel
actually
99 channels of indexes
and 1 channel holding the actual data
hello
I have been told to come here and ask about a problem I have with installing Bots on a discord server
I humbly require your assistance
you can just ask your question and when someone has an answer they will let you know
this place is more about developing bots, but well
Eri told him to ask it here 😛
to add a bot to a server, you need to have the right permissions, be logged in in the right account in the website version of Discord, and then open a discord bot invite link
ok my question is, if I create my own server but only use a free discord account, can I add a bot or do I need to upgrade ?
yes you can add bots
well I just tried and it failed
I get the screen with Authorize then nothing happens when I click on it
I checked adblock and turned off my antivir
does it show a list of servers to select?
bruh
are you zoomed in?
it just goes onto the first screen and if I click it doesn't do anything
zoom out of the page
not zoomed in
"only free discord account" lmao
I can give you a screen shot
show the screenshot
Are you kidding with me
Yes he is i think lol
ok @flat pelican and @sterile minnow are you guys on crack or what ? Is this how you help people who come in this server for advice ? This ain't your mom's kitchen, punk. You talk a whole lot about respect but all I get from you is patronizing BS.
check yourselves, boys.
lmao
LOL

And why trying to @e
that escalated quickly
@quartz kindle yes it did
-m @oak thistle Needs to rest for a long time. This server is a bot list, not google. Keep things respectful the next time please | 1 week
🤐 Muted AshDrunbar#3628 (@oak thistle)
My only Thing to this question is: http://giybf.com/
Google Is Your Friend If someone askes you annoying questions, tell him about giybf.com!
The thing you asked in #general was #development related, now you switch here for asking about how to add bots
You are completely doing the opposite of what's being said
i think he just couldnt express properly in english
Okay k Thing eri is being mad
add/authorize/invite to server
Yes
I don't think that someone talking like that has issues when they need to express their problems https://eri.party/i/EFoUad.png
Basically, if he didn't react the way he did, he'd have a valid point
Yes, and how the f*ck is he allowed to speak so to a mod
well he's not
Forget the part that I'm mod
Yea
Nvm, let's get things back on-topic guys
Yes
I guess he was on a wrong account and just needed to switch accounts
but I didnt really understand what he meant
Idk but now its a offtopic thing
how do you @ someone with your bot?
He already left the server anyway 😛
<@userid>
Most libraries have a getMention function
<@user_id_here>
can you do <@message.author.id>
Yes
yes but no
Or use message.reply xD
try ${message.author}
What are you using to declare the message thing JoJo
for pinging me it would look like @blissful scaffold
wdym
all libs have a mention for user objects
like for python:
message.author.mention```
I'm in javascript
to mention someone you need to send a message containing <@userid>
how depending on your programming language, you need to build that string
message.author i think
you cant just write it
ok
for example, one way would be "<@" + message.author.id + ">"
or do what eri suggested and just use the mention option
yes, check with your library's documentation
thanks
id will work too
the thing above is a "long" way to mention someone
user.mention is more speedish
ok
I've a question and idk if this question can ve here but i ask anyways: has anyone a idea in wich language @gilded plank and @pliant gorge is written in?
user isnt defined
ok thanks
bruh
yall couldve used <User>#toString() if you were struggling with basic string + string stuff
I thought Luca was written in Java 
I am a bit stumped. I am trying to create a bot that will take input from a chat and add it to a google sheet but have it almost chat style? Example- (Start bot command) What is your name? Answer What is your age? Answer and have the results posted to google sheets? Is that even doable?
the questions would be set questions so I guess its just a form you complete via discord and have the results in sheets?
you can use some google sheets api probably
ik its a joke but this insults me
haha yes java is short for javascript
Help plz (djs v12)
@tight plinth try client.guilds.cache.size
Heh
@tight plinth you updated your d.js without knowing you did update it
I updated to v12 like a month ago
https://github.com/discordjs/discord.js/commit/fe7df708e44e0280dfaf0f8e457b154781bb5140 make sure you dont exceed this commit or else you would rewrite most of your bot
probably you didnt notice you did npm i and it updated to latest
or you are not specifying what build you should use
I think I specify the version
means just intall the latest commit in master in d.js repo
you are not specifying any d.js commit in master to install
nah it will still install the same version
what im saying is
you are not specifying any commit in 12.0.0-dev
yes finally you got the gist
Gonna do that after skool
just dont exceed the version above and you wont need to rewrite that
or if you want to, make sure you read the docs
because there is a lot to change
client.guilds.forEach(guild => {
guild.leave()
}) ;
This is how to get the best bot ever
What is being done here?
bots
You throw my bot commands here
no
function random (number) {
return client.uptime%number
}
let h = random(10)
if (h===87) {
message.reply('lukky')
}
else {
message.reply('unlukky')
}
First one to get 'lukky' wins a hug
With proof
ez
:hug:
but what kind of rng is that
thats not possible
how to make a vulnerable rng
probably like this rng
h is only going to be between 0 and 9
random(10) + 1
why not just Math.ceil(Math.random()*10)
Hi, i have a question, i need to get a user id from a db and send a DM to him, how i can do that?
db.get(`SELECT * FROM tickets WHERE id = ${arg1}`, (err, filas) => {
var respuesta = new Discord.RichEmbed()
.setTitle("Respuesta de ticket")
.setDescription("Tu ticket ha sido respondido!")
.addField("Staff", message.author.tag)
.addField("Respuesta", arg2);
console.log(filas.userid);
message.guild.members.get(`${filas.userid}`)
.send(respuesta)
.catch(console.error);
});
i got a error
TypeError: Cannot read property "send" of undefinied
How to get video's from a youtube playlist in discord.js?
hm
I will try but you know how to get video data from a youtube playlist?
i use client.users.get too but didnt works
Playlist = song list
Copy code from others open sources lavalink bots
oh my
Why is math not defined
Why that spamming?
`Failed to run preInit on data: Error: EACCES: permission denied, mkdir '/data'4:06 PM
a few seconds ago`
Help
use sudo
@earnest phoenix that’s not an user object
Anyone knows why my Discord is stuck at Checking updates when I start it?
3|oooo | }
3|oooo | Error: Cannot find module '/root/oooo'
3|oooo | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:973:15)
3|oooo | at Function.Module._load (internal/modules/cjs/loader.js:855:27)
3|oooo | at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:27:21)
3|oooo | at Module._compile (internal/modules/cjs/loader.js:1144:30)
3|oooo | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)
3|oooo | at Module.load (internal/modules/cjs/loader.js:993:32)
3|oooo | at Function.Module._load (internal/modules/cjs/loader.js:892:14)
3|oooo | at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
3|oooo | at internal/main/run_main_module.js:17:47 {
3|oooo | code: 'MODULE_NOT_FOUND',
3|oooo | requireStack: []
3|oooo | }```
What to do
Yes
can you send some code
Like
so we can see what the problem is
well the error says it can't find /root/oooo
I mean the code not this
when ppl dont know what ips are for
and if it haves ddos protection, then u can expose the ip xd
@earnest phoenix glitch.com be like
What's the fastest way to get artifacts from my local java (maven) project onto my vps
hello! how do i make a bot display stats, ie versions of libraries and such?
i tried to google but can't find anything
it's not just hardcoding it in right
@knotty fiber what lib
probably best to look your librarys documentation.
@late hill probably with sftp if theyre local.
for example discord .js
i see
works just for discord.js so far it seems
at least it's easy to display nodejs version
Is there something like that in python
yes
Can you please tell me how that works in python then
discord.py got a __version__ var i belive
It's like a standard
@ocean frigate normally .__version__
😱 I used python so much but didn't even knew that!
Shock me
I have yet very much to learn
😱

wtf help me
@uneven wyvern Do you have the index.js file?
nope
@uneven wyvern vscode striaght up says thats where your file is
@cursive vapor @earnest phoenix
Not this
I think not here
My bot avatar is GoodBot
@mossy vine C:\Users\Dimitri\index.js has got index.js file?
what
ok
Wrong people
My bot avatar and her name
@earnest phoenix i think not here in this guild.
its just muted
@urban junco
welp nvm
Yeah its
Fix bugs and reply add bot
remove the feature it was kicked for and ask a moderator to reinvite it
also if its prefix is # you will not be able to use it in this server, as its a common prefix
Do i should do the prefix $
make the prefix like
bot_initals$
so if I made a bot and it was called: " Fweaks Cloud " id use fc$command
LoL
Gay Bowser is actually the doom slayer in disguise
Tonkkums help
@earnest phoenix You have to disable DMs about boosts for this server
in otherwise, we won't add it back on this server
Hi
i have this problem
Error: This video is not available.
at request (/home/ubuntu/node_modules/ytdl-core/lib/info.js:47:25)
at PassThrough.Miniget.stream.on (/home/ubuntu/node_modules/miniget/dist/index.js:196:32)
at emitNone (events.js:111:20)
at PassThrough.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
The video isn't available
Are you hosting the bot?
if(message.content.startsWith("mw!play")){
if(message.author.bot){
} else {
let canalvoz = message.member.voiceChannel;
if(!canalvoz) return message.channel.send('¡Necesitas unirte a un canal de voz primero!.');
if(!args.join(' ')) return message.channel.send('Ingrese un enlace de youtube para poder reproducirlo.');
canalvoz.join()
.then(connection => {
const url = ytdl(args.slice(1).join(" "), { filter : 'audioonly' });
const dispatcher = connection.playStream(url);
url.on("error", console.error);
message.delete();
message.channel.send('Reproduciendo ahora: '+ args.slice(1).join(' '));
console.log()
}).catch(console.error);
}
}
yes
in a vps
is the vps by any chance is in another country as you?
Yes
The video may be geo-blocked
or there is a child filter thing
What country is your vps in
Have you tried other urls
yes
is all getting blocked
all say that
aka nothing will play
the bot says that is playing
but i dont listen nothing
fc$commands
?
#help
@urban junco
But why the bot is kicking
big brain
someone that can help me?
ask
someone will be more likely to respond
that is my question
nothing you can do about it
try updating ytdl, or wait for a fix
check the ytdl github
if absolutely no video works, even with updated ytdl, your machine's ip address might be blacklisted or something idk
@earnest phoenix Youtube has been banning ips to stop people breaking tos
which scraping the site for videos is
so
*breaking their tos
so?
Why do I get a FileNotFound error but when I follow the link (vscode) it opens the file just fine? Python
have you added the .txt or whatever to the end of it?
Yeah the error is specifically [Errno 2] No such file or directory: 'bot/generator/gpt2/models\\model_v5\\encoder.json'
The double backslashes are done by os.path.join
is the main file already in bot?
Looks like you are making a bot for AI Dungeon? 😛
It's working now I guess I didnt see it was done with bot at first anyways thanks @unique nimbus
it is okay mate
And @blissful scaffold yes. https://oliy.is-just-a.dev/nlt0zj_2783.png Although it, admittedly isn't going so great
I tried to run it once on my pc, the software and my pc both didnt like it 😄
Yeah it takes some power
Saving the story is the hard part rn
the encoder is having trouble
I think the software always threw an error when i tried to save it
My problem is encoding
Looks interesting to have a bot run it, now just hope that there wont be 100 servers who try to generate a story at the same time
Well the AI is pre-trained
I wont be training the AI at the time it runs, the server would just die
But because GPT2 is pre-trained it's more possible
https://oliy.is-just-a.dev/p6ra8f_2784.png I love AI's
I put on my silk shirt and wear my silk shirt
https://oliy.is-just-a.dev/489ew_2785.png much nicer encoding
K, I'm back
@amber fractal just replace the \\ with /'s
i have the same issue with running on windows vs linux
I just replace double backslashes with /
I already fixed it
officially windows directory formatting needs \, but bill gates is nice and windows also accepts /
^
why and how is \ the main one?
How can we do a command that tells information of the server you posted the command on, Like example:
Server name: Discord bot list
Server ID: The server's ID
Owner: the server owner
Total members: 100
Total bots: 10
Total humans: 90
Channels: 20
Emojis: 0
Roles: 21
Server creation date: January 10th, 2019
Wdym? Im alittle confused
what library do you use?
Im starting to make it, where can i find it sorry if it annoys you
discord.js
discord.py
discord.net
discordia
restcord
etc...
Oh






