#development
1 messages ยท Page 486 of 1
^
Ok
In summary, you can use
if (msg.channel.nsfw) {
...
} else {
...
}```
or
```js
if (!msg.channel.nsfw) return
// Channel is nsfw
...
Alright so I'm gonna integrate real phone texting into my bot. Now, should it:
๐ฆ Give each user a number, but will require them to most likely pay for it in one way or another (But can occasionally earn one)
๐ง One number for the entire but it has extensions so the receiving user will have to say who they want to "text" then text them
Ask questions if you have any
This is wonderful
Panel placement is wonderful, yeah
lol
shhhhhh
This what eval for, tbh
to evaluate commands instead of having to push updates and test things you can just use it to test features
or find certain vals
Yeah, thanks for info, didn't know that...
I'm rearranging my code. I'm installing the required packages, but it doesn't seem to be installed. Why?
here's the package.json dependencies area
those arent required
I just want to install
it's not just for the bouquet. it's not a good idea to watch some videos because packages are not installed.
they either increase websocket speed or increase voice packet encryption and decryption
hm
@earnest phoenix its the wrong version
u installed uws v99
the uws version u installed isnt the version it said to install
d.js v11.4.2 needs v9.14.0
hmm
i think you can install a certain version using npm i uws*9.14.0
Thank u guys
or just change the version in the package.json
okay thx
thats works too
ARRIBA ESPAรA
How could I use tensorflow.js to help make a deep learning ai chatbot?
Its not for a discord bot btw
welps
just trying to figure out how tensorflow works so I can use it on a science project
Ive been reading the documentation but its confusing
see? ```js
import * as tf from '@tensorflow/tfjs';
// Define a model for linear regression.
const model = tf.sequential();
model.add(tf.layers.dense({units: 1, inputShape: [1]}));
// Prepare the model for training: Specify the loss and the optimizer.
model.compile({loss: 'meanSquaredError', optimizer: 'sgd'});
// Generate some synthetic data for training.
const xs = tf.tensor2d([1, 2, 3, 4], [4, 1]);
const ys = tf.tensor2d([1, 3, 5, 7], [4, 1]);
// Train the model using the data.
model.fit(xs, ys).then(() => {
// Use the model to do inference on a data point the model hasn't seen before:
model.predict(tf.tensor2d([5], [1, 1])).print();
});```
idk
oof ok
then this is for a discord bot


google it ?
I have you know how fucking confusing a neural network is to a fucking 14 year old?
then dont use one 
๐
how am I suppost to make a smart chatbot then? 
@cold harness
oof whos that
uh hi
@earnest phoenix needs help
he is using tensorflow
and you kinda use tensoerflow so
oof

for a science project that I have 5 weeks for 
Im trying to read the docs
but they're confusing
um i can't give you my algorithm, but there's a bunch of tutorials on LSTM networks
ok
and man you picked a bad project for 5 weeks, LSTM networks take a literal eternity to train
oh shi*
it's fast at first, but you want to get it to 0.05 loss, and it starts flattening out at about 1.2 loss XD
thats good I just need one that could probably answer a few basic sentances
I'm going to improve the bot over like 4 years so
my code for my bot is at https://github.com/JEF1056/JadeAI , if you want to check out the interpreter and how it works
I can also provide the training data
the Jade V3.ipynb?
the interpreter, the program that reads the model and spits out sentences
ah
is this python?
I'm using tensorflow.js
Probably very similar
wdym
like hm inputs
my dataset is literally a ton of sentences
oof really
yep some are conversations, but they're not really organized in any manner
I thought they would be in a dataset kinda like this idk http://prntscr.com/kuuwkp
i spent like the last half year collecting 20mb of raw text data
i mean you could do it that way
just read all messages from discord 
but naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah i'm too lazy
for a dataset like that would I do something like
[
{
"lastmsg":""
"msg":""
}
] ``` or something
idk
depends on how your trianing script is programmed
mine takes arguemnts that are just formatted like
> hi
> oof
well I have no code currently
Im still trying to figure it out
oh
oh thats cool hm
ok i thought tf.js was similar to the python version but l literally understand none of that
same ;-;
We're on the same page lmfao
I'm watching this https://www.youtube.com/watch?v=XdErOpUzupY trying to understand it
In just a few lines of code, we can build and train a neural network with Google's Tensorflow.js. Birthed by Google engineers, TensorFlow is an amazing machi...
true
Because I really don't wanna make a bot in python
ill be confused with the most basic things
youtubeapi.searchVideos(args[1], 10).catch(console.log).then(results => {console.log(results.toString())}).catch(console.log);
break;```
Hey can someone tell me what I am doing wrong. I am using npm simple-youtube-api to search videos and fetch them. The code above searches whatever is put after the flvr;yts (ie. args[1] = search query) When I use it all I get is 10 objects outputted in console...
```[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]```
How do I get the search results instead
btw simple-youtube-api docs are here https://hypercoder2975.github.io/simple-youtube-api/4.0.0/
@rustic axle results is an array
you can access it like an array
results[0], results.<whatever>
I tried it
and it said cant read property of 0 of undefined
Oh I am stupid I have to remove the .toString()
rip
I don't know why await asyncio.sleep in py stops after sometime like it will work cool for few hours then automatically stops looping
It has never stopped for me 
OOF
the confusion is real
```
Client.quickDB.createWebview isn't a function?
ok
http://prntscr.com/kuw3lq can anybody tell me what this error is please ?
ur internet
How do I get all the server names and all the server id's that my bot is in? ~From the bot console & For node.js / discord.js
let commandFile = require(`./play.js`);
commandFile.run([this.videos[parseInt(m.content)-1].url]);
``` ```css
Uncaught Exception: TypeError: commandFile.run is not a function
Well in the console I'm not entirely sure
But you can eval console.log()
let commandFile = require(`./play.js`);
commandFile.run([this.videos[parseInt(m.content)-1].url]);
Uncaught Exception: TypeError: commandFile.run is not a function
Okay if I where to put it in the code ( visual studio code ~or atom ) what would I put in there to get all server names and server id;s
module.exports = {
run: 'whatever'
}``` in play.js doesn't exist @cinder stratus
ooh thnx
https://github.com/AnIdiotsGuide/guidebot-class i cant understand how i put @west raptor
it is code from my old bot when i am trying to use in guidebot class it doesnt work and thrw thid error
Uncaught Exception: TypeError: commandFile.run is not a function
ok
can you help
because its not a function
^
maje it into a function
Hey exuse me but can someone help me develop my bot
I'm a noob at the discord bot coding peogram
Program*
@summer escarp first, learn a coding language
^
like what
You lie

can i uze html to make a discord bot?
WHAT I'M A NOOB
what languages do you know @summer escarp
Welcome back to my guide, helping you create a Discord Bot using the amazing Discord.js library I hope you follow along and create your very own bot! If I go...
I know python, java, and js
@summer escarp
Google is awesomeโข
@summer escarp what do you know the most
I mostly know the scripting format Google scripts uses
What
let commandFile = require(`./play.js`);
commandFile.run([this.videos[parseInt(m.content)-1].url]);
how i change this into function
confused

cba to explain rn
class Play extends Command {
constructor (client) {
super(client, {
name: "play",
description: "To Play Music",
permLevel: "User",
category: "Music",
usage: "play [youtube video link]",
aliases: [""]
});
}
async run (message, args, level, client, ops) {
};
}
module.exports = Play;
so what i do
?
WHAT does it mean when u add a bot to a discord server and it aays coding not granted
ss
cba
cam you help @west raptor

@summer escarp can you explain??
My bot i am trying to invite to a discord server for a fellow dev and it says coding perms needed
?
Who is interesting in being a JavaScript coding buddy with me? I mean like code a bot with me. It would be nice to voice chat with omseone and be their coding buddy.
@summer escarp screenshot it
I cant
And @vernal lion I doubt anyone is
I can
Why can't you @summer escarp
I have the image
Oh
I already exited from the screen i wouldnt be chatting if i didnt
...
THX
Turn off require code grant in the application settings page
Where
Step up your game with a modern voice & text chat app. Crystal clear voice, multiple server and channel support, mobile apps, and more. Get your free server now!
Ok
Done
H
then you get a special role
?
its the under 13 role
@hushed berry this guy needs his special role
Wtf
you need to ping a mod to get it
cmon guys.
@sullen path u do know the special role is gone
What?
darn
How would I make my server info command list all the roles ( without mentioning them? )
is it in an embed?
Yes, but I still don't want to mention the roles though
Thx to whoever reported me to mee6 support
Ok
Lol
๐ค what
When ur under 13 and u go to a support team who has rules saying no one under 13 u get abnned from support ur servers with the bot lose the bot and U LOSE ALL PLUGINS
Its not fun
i'm an issue
๐ค
'burning whoever said it' is a threat mate
๐ต๏ธโโ๏ธ๐ต๏ธโโ๏ธ๐ต๏ธโโ๏ธ๐ต๏ธโโ๏ธ
Wdym you lost plugins @summer escarp
When u r under 13 and u use mee6 when ur caught everything from mee6 is revoked no refund
How did you pay for it though
Also it's only your fault ur stupid enough to admit ur breaking tos
My parents got involved
They allowed me to have discord and bought me those to help my server grow
Welp
It says
If your over 13
the user
@summer escarp the parent thing is if you're between 13 and 18
Anyways you'll probably be unbanned from mee6 after a year
Nope
How would I make my bot mass unban users?
you abuse the API
If you were to mass unban users, get the bans and loop through them. Keep in mind to not send all the requests at once.
so
something like
message.guild.fetchBans().unban() -- how would I make it loop though?
Discord.js?
Yea
fetchBans returns a promise. You need to wait for that and then use forEach on the collection returned.
alright thanks
Well
I'm going to be the only one using the command
In my server
only
So I guess that wouldn't be abusing the api if I do a slow response time
The moment you make any request to Discord you are using it's API
Just remember to not send all of them at one time. Timeout each one
I will
need a bit of help with node strings. i have this to add 8 spaces before some content, for formatting
but
it doesn't space it
any ideas why?
cuz whitespace reasons
repeated whitespaces are trimmed
you could use an empty emoji or play with some symbol separators if something works out for you
or h4x it like this \u200B \u200B \u200B \u200B \u200B \u200B \u200B \u200B
space+zero width won't cause the leading space to be trimmed
rinse and repeat

Does anyone know how to put a bot online 24/7?
@dapper fiber host it duh
Where?
on a VPS, dedicated server, something
also anyone know why on a new server, my bot isn't detecting if a user is the server owner, even tho they are?
i have js if (user.user.id === msg.guild.owner.user.id) badges.push(' \u200B Server Owner');
but it never pushes the badge
user.user.id?
@sick cloud Is your bot hosted and if it is, what hoster did you use?
I want my bot to be online because I got school and stuff
Any for free?
Github education pack is a thing, it has $50 free credit for vps hosting
just need an edu email address
@sick cloud still need help?
let pages = [`${helpembedbasic}`, `${helpembedreport}`, `${helpembednsfw}`,
`${helpembedserver}`,`${helpembedfun}`,`${helpembedop}`,`${helpembedmod}`,];
let page = 1;
message.channel.send(helpembedbasic).then(msg => {
msg.react('โช').then( r => {
msg.react('โฉ')
const backwardsFilter = (reaction, user) => reaction.emoji.name === 'โช' && user.id === message.author.id;
const forwardsFilter = (reaction, user) => reaction.emoji.name === 'โฉ' && user.id === message.author.id;
const backwards = msg.createReactionCollector(backwardsFilter, { time: 60000 });
const forwards = msg.createReactionCollector(forwardsFilter, { time: 60000 });
backwards.on('collect', r => {
if (page === 1) return;
page--;
msg.delete().then(msg => {
msg.sendMessage(pages[page-1]); })
})
forwards.on('collect', r => {
if (page === pages.length) return;
page++;
msg.delete().then(msg => {
msg.sendMessage(pages[page-1]); })
})
})
})
I want to send help commands in the form of pages.
But I got This Error ;
he wipes out the message and shuts himself down
send YELP
HELP
MELP ETC
OFFF
@austere meadow i got it now
Hey guys can u help me? const embed = new discord.RichEmbed() .setTitle(json.name + ',' + sys.country + ' adlฤฑ ilin Hava Durumu') .setThumbnail('http://openweathermap.org/img/w/' + weather.icon + '.png') .setColor(0xFF0000) .addField(':wind_blowing_face: ยป Rรผzgar', 'ยป Yรถnรผ:' + windDirection(wind.deg) + '\nยป Hฤฑzฤฑ:' + wind.speed + 'km/s', inline=true) .addField(':cloud: ยป Havadaki Bulut oranฤฑ:', '**%' + clouds.all + '**', inline=true) .addField(':hotsprings: ยป Hava nasฤฑl?', '**ยป Sฤฑcaklฤฑk: **' + ccelsius + ' ยฐC / ' + cfahrenheit + ' ยฐF**\n ยป Gรผn iรงinde en yรผksek sฤฑcaklฤฑk: **' + hcelsius + ' ยฐC \n**ยป En Dรผลรผk Sฤฑcaklฤฑk: **' + lcelsius + ' ยฐC\n**ยป Nem Durumu: **%' + main.humidity, inline=true) //.addField('Gรผneล', 'Gรผndoฤumu: **' + UnixToDate(sys.sunrise)[1] + '**\nGรผnbatฤฑmฤฑ: **' + UnixToDate(sys.sunset)[1] + '**', inline=true) .addField(':sun_with_face: ยป Gรผn Doฤumu:','**ยป Gรผndoฤumu: **' + UnixToDate(sys.sunrise) ,inline=true) .setTimestamp() return message.channel.sendEmbed(embed); } Error: inline is not defined Forecast system
u are setting inline=true and inline is not defined
and you shouldnt be setting it to true there
just put true as the 3rd arg iirc
How do you filter out audit logs by if an action is executed this moment?
I guess you can look for the first action and target that meets the conditions
i made it if the first action is member on kick it logs, but if the user rejins and leaves it logs again
if (cmd === `${Prefix}userinfo`) {
let user = message.mentions.users.first();
if (!user) return message.reply("Please mention a user");
let userembed = new Discord.RichEmbed()
.setTitle("User Info For " + user.username)
.setColor("#FCC1F8")
.setThumbnail(user.avatarURL)
.setDescription("ยญ")
.setFooter('Requested By', message.author.tag)
.setTimestamp()
.addField("Username", user.username, true)
.addField("User ID", user.id, true)
.addField('Presence', user.presence, true)
.addField('Presence Status', user.presence.status, true)
.addField('Presence Game', user.presence.activity.name, true)
.addField('Tag', user.tag, true);
return message.channel.send(userembed);
}
When I run this code, my robot shuts itself down. without warning or error. Why?
catch the error by printing it into the console, that way it won't shut down and will give you an exact reason why it's failing
@signal saffron It should be
.addField(..., ..., true)
You're passing a value to the function, not assigning anything
okay I do
error says its not a url
<help me pls
they think that they are concatenating with their string
or how do you spell that word
uhm yeah but
I'm pretty sure , separates parameters, so it thinks that your message.author.tag is an icon url
still nothing
It doesn't work when I Add these codes
.addField("Username", user.username, true)
.addField("User ID", user.id, true)
.addField('Presence', user.presence, true)
.addField('Presence Status', user.presence.status, true)
.addField('Presence Game', user.presence.activity.name, true)
.addField('Tag', user.tag, true);
try this instead in your footer 'Requested By' + message.author.tag
I do
Requested ByDeivedux#0248
yeah, add a space before the last '
uncaught promise rejection
in future node versions, this will terminate 
if (cmd === `${Prefix}userinfo`) {
let user = message.mentions.users.first();
if (!user) return message.reply("Please mention a user");
let userembed = new Discord.RichEmbed()
.setTitle("User Info For " + user.username)
.setColor("#FCC1F8")
.setThumbnail(user.avatarURL)
.setDescription("ยญ")
.setFooter('Requested By ' + message.author.tag)
.setTimestamp()
.addField("Username", user.username, true)
.addField("User ID", user.id, true)
.addField('Presence', user.presence, true)
.addField('Presence Status', user.presence.status, true)
.addField('Presence Game', user.presence.activity.name, true)
.addField('Tag', user.tag, true);
return message.channel.send(userembed).catch(error => message.reply(`Couldn't delete messages because of: ${error}`));;
}
here's the new code
does it work?
no
no this happens after the robot executes the command
Hi
also There's nothing there.
what is .setTimestamp()? does there have to be something inside the ()?
Are you using discord.js?
It looks like it from your code, but I don't want to assume
ok here's what you can try, pleases wrap the everything with try and catch the error in the console, that will make everything a lot easier for everyone
error catching
/*
Avoid your bot from crashing on any errors
*/
process.on('unhandledRejection', error => console.log(`unhandledRejection:\n${error.stack}`))
.on('uncaughtException', error => {
console.log(`uncaughtException:\n${error.stack}`)
process.exit() //better to exit here.
})
.on('error', error => console.log(`Error:\n${error.stack}`))
.on('warn', error => console.log(`Warning:\n${error.stack}`));
this is setTimestamp
You can try putting that at the bottom of ur index.js
okay
okay give sec
Hey I have a weird ass problem with my Java bot
Error: Could not find or load main class Elixyr.Elixry.Main
can't find main even though it's obviously there
Well, I just wanted to ask what branch he was on, since Presence class in stable doesn't have activity field
also, not relevant tip, but instead of asking to put a user as an argument you can default it to the message author 
node might be erroring because you're trying to access fields of a null or undefined object. Not sure why there are no console logs though
cannot read property whatever of undefined would be the error
for description ?
catch the error when the message is sent, and console.log
not sure it's invisible character
NO ERRORS
I MEAN NOTHING
send code
SPACe
did you try catch
@earnest phoenix can you run npm list in the directory and tell me the version of discord.js you have?
I think it's 11.4.2
Well, there's the problem
wot
You're reading the docs for master
I don't use js but... 
guild.channels.find(channel => channel.permissionsFor(guild.me).has("SEND_MESSAGES")).send({embed})
Not a function?
@earnest phoenix heres the code
if (cmd === `${Prefix}userinfo`) {
let user = message.mentions.users.first();
if (!user) return message.reply("Please mention a user");
let userembed = new Discord.RichEmbed()
.setTitle("User Info For " + user.username)
.setColor("#FCC1F8")
.setThumbnail(user.avatarURL)
.setDescription("ยญ")
.setFooter('Requested By ' + message.author.tag)
.setTimestamp()
.addField("Username", user.username, true)
.addField("User ID", user.id, true)
.addField('Presence', user.presence, true)
.addField('Presence Status', user.presence.status, true)
.addField('Presence Game', user.presence.activity.name, true)
.addField('Tag', user.tag, true);
return message.channel.send(userembed).catch(error => message.reply(`Couldn't delete messages because of: ${error}`));;
}
user.presence doesn't have activity field, hence the error
try user.presence.game.name instead
Be wary though, since game can be null
You can use nested ifs to check
or just
.addField('Presence Game', user.game ? user.game.name : 'No game', true)
Yeah, it should be == null
And it's reduntant in JavaScript anyway, because of the implicit conversion
variable ? true : false is equal to variable !== null ? true : false
Please, I love this
It's realy useful in some cases
oppposite
ew
!!variable
.setTitle(`User Info For ${user.username}`)
.addField("Full Username:", `${user.username}#${user.discriminator}`, true)```
These say undefined
Username is a property of the User class, not member
so it would be user.user.username
try msg.mentions.users.first()
or just define it as member and then define user as member.user
ty

also this is not a function but it worked previously
guild.channels.find(channel => channel.permissionsFor(guild.me).has("SEND_MESSAGES")).send({embed})
send the whole error
^
because there could be multiple things in there that couldn't be a function
guild.channels.find(...).send is not a function
it would be msg.guild iirc
its for a guild join message
oh
Also permissionsFor can return null, in which case you'll get another exception, so look out for that
how could it
Can't call the has method on null
I think there's a better way of checking for permissions btw
Or not, actually, I was thinking of something else
https://i.imgur.com/KV76FAT.png
.addField(`Bot?`, `${user.bot}`, true)
?
what is user defined as
let user = msg.mentions.members.first();
or
const user = msg.mentions.users.first();
member is not defined
^
@frigid bone im assuming they will want to get roles later
so
member will need to be defined
Oh will they
anyone have any idea how i would simply match a string even with foreign characters so like รง would automatically be turned into c, in a message, without having to match it a completely seperate time
replace the foreign characters with the ones you want
And how would I do that
what lang
discord.js
then just .replace
How to disable cmds in a specific server?
store a list of server ids where you want a command disabled
check it when they use it
is there a way to check 2 things to see if its true?
yes, you can use and
๐ ฑom how do i do it so that it doesnt only replace 1, because when i use .replace it only replaces the first thing to match then it doesnt do any others
py:
if something and something_else:
do_something()
js:
if (something && something_else){
do_something();
}
@slim heart make the replacement global
and... how would i do that (sorry)
is it just .replace(/thing/g, 'thing')
embed.addField(`Staff?`, `true`, true)}
if (user.id !=='') {
embed.addField(`Staff?`, `true`, true)}
else embed.addField(`Staff?`, `false`, true)```
Would this work?
what are you trying to do?
its for userinfo
ok so are you using multiuple if statements to check if a person is staff
with a fixed list of ids?
yeah
ok lemme offer an alternative way:
what does a regex global flag do
//put at the top
const staffIDs = ['id goes here', 'another id goes here']
//when building your embed
embed.addField(`Staff?`, staffIDs.includes(user.id), true)

regex global flag just means dont stop after we find 1 match
let coinAmt = Math.floor(Math.random() * 15) + 1;
let baseAmt = Math.floor(Math.random() * 15) + 1;
console.log(`${coinAmt} ; ${baseAmt}`);
how to make it like that it only works on selected servers ...?
check the server ID
if I wanted more IDs could I do ['id', 'id', 'id']?
yes 
okay
ty
Looking for devs of my bot anyone want to help?
What do you need help with?
help getting somebody to make a bot for him 
My dev is offline and i need spmeone to get it online and add an economy system as my dev doesnt know how
idek why i come to this channel sometimes 
didnt you say yesterday you knew javascript, python, and java
Yes but im on mobile
smh
If u can help dm me
on mobile
"my dev" is offline
whitename
dev channel
fishing for spoonfeed
story dont add up 
just another day in dbl

LOL
@topaz fjord
Rly im on mobile
Dm me if u can help๐ ๐

oof stoopid mobilers
about that
this chat is so offtopic
^
ban hammer
Lol
how to make it like that?
like what
message.guild.channels.find(c => c.name === "bot-hell");;
i can add more channels?
like "bot-hell""botcommands"
?
loop?
why are you hardcoding a channel search by it's name? 
and why are there 2 ;'s at the end?
how?
anyway I came here for my own question
ik that on_member_remove returns a member object that left the server
but does the object also include the list a roles they had before leaving?
what
what
How fast should the post from the webhook test button come in
few seconds
Guess it's just broken, actually upvoting works but the test button doesn't
Is there a method to have my bot download the attachment of a command? This is in DiscordJS. A quick link to the docs or an example would be great.
Search attachment under the discord.js docs
I think there is
Or at least a way to check for an attachment
I tried this but to get the bot onlinr and just noticed it isnt, any solution?
const bot = new Discord.Client();
const TOKEN = NDkwNTEyODg4MTgwNzY4NzY4.DoAdfw.Y8NK_84_BfudvCE_P_94q6urS98
bot.on('message', function(message){
if (meessage.content == 'Hello')
{
meessage.reply('Hello,How your day is going?');
}
}};
bot.login(TOKEN);```
well first of all you start by censoring your bot's token
I changed it, already.
@verbal jolt your bot's token is literally the same thing as your user account's login credentials (email and password), so by leaking it you are giving away control of your bot to everyone who wants to
I said, i changed the token...
yeah you said that a second before I sent that message, I don't read minds
Okay, so the error is that the bot isnt online
a token must be a string
unless if its in an .env file
did you run the file
ReferenceError: (Token is here)is not defined
at Object.<anonymous> (C:\Users\Yolo\Documents\VSC\index.js:3:15)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:279:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:696:3)
did you put it into a string?
I'm not js, but aren't variables defined with let instead of const?
Yeah, its in string
you can use let, const, and var
^
hmm..
well python's easy, you just need a variable name and no other shit ยฏ_(ใ)_/ยฏ
oof still.
ok so like
do this
const Discord = require('discord.js');
const bot = new Discord.Client()
const TOKEN = 'token idk'
bot.on('message', message => {
if (message.content == 'Hello')
{
message.channel.send('Hello!')
}
})
bot.login(TOKEN)
yes
show how the terminal looks like after you run it
^
im getting the same error
wew
just show it
^
ok
"bot is offline" is not the error, you never showed it to us in the first place
show all the code
why did you censor it 
its the token..
i mean
doesn't it suppose to tell you that a variable is not defined and not it's value?
.
even if that is true, double check if you accidentally didn't copy paste the client secret instead of token
do you have a webserver?
no
just in case, dbl webhook is talking about an actual webhook that listens to POST requests
not discord's webhooks
discord webhook is only capable of sending messages in channels, you need a dbl webhook to receive content from POST, for example who voted and stuff
So the webhook URL in the ready post, is that what I would use?
I haven't used webhooks myself yet, I'm only talking from experience from others
iirc, a webhook is needed for dbl to know who to send the POST request, and then later it's up to you what you do with the content
Ok
normally you'd know who voted for your bot so they get access to "extra features" or something
ยฏ_(ใ)_/ยฏ
Does anyone know how to make a random meme command?
no there isnt
best way to do it is putting the ids into an array also ^
In your message handler return if the set/array has the id
And just put an if(blacklist.contains(message.author)) {
Does anyone know how to make a random meme command?
put links to a file and grab them or grab a meme off reddit or smth like that
Hello, someone knows a bot that has custom commands and can do this: for example I create a command /lol and it executes the command %weather of another bot
lamo
@fierce cove that is not a developmental question
also no because bots can't respond to other bots here
@west raptor
const totalMemUsage = ${key} ${Math.round(used[key] / 1024 / 1024 * 100) / 100} MB
Where should I
huh
Give me for me
what
Contains isn't a thing in js
yes
what are you doing to get presence game
.addField('Presence Game', user.game? user.game.name : 'No game', true)
Yes
Thanks
@west raptor
.addField('Presence Game', user.game? user.game.name : 'No game', true)
member?
user.presence.game.name
.addField('Presence Game', user.presence.game? user.presence.game.name : 'No game', true)
?
.addField('Presence Game', user.presence.game ? user.presence.game.name : 'No game', true)
aren't presences per guild? 
wdym
ty
the discord api sends presences per-guild
an user could have two different presences in two different guilds
that happens with sharded bots
when you set different presences for each shard
-bots @craggy cave noembed
YetiGuy!#0001's bots:
@coarse atlas
this development channel
pls
@inner jewel but wouldn't the user have to be a self/user bot to do that if it was a user?
is joinedAt a thing or no
yes
it is?
yes
okay
Ohh that makes sense
if(blacklistIDs.includes(user.id)!=='true') msg.channel.send("Error: you're blacklisted!"); return;```
Why does this blacklist everyone?
cuz its true not 'true'
just use this js if(!blacklistIDs.includes(user.id)) return msg.channel.send("Error: you're blacklisted!")

im trying to make a cooldown that says Sorry, this command is on cooldown. Try again in {}seconds. Im using discord.py and this is my code
@commands.cooldown(1, 3, commands.BucketType.user)
async def guess(ctx,number = ""):
"""Guess the number from 1 to 2,000. Winner gets Blah"""
if number == "1461":
await bot.say("CONGRATS!!! :tada: You Just won Blah for guessing the right number. :tada:. The number was **1461**. <@!{}>, please DM @proven surge for prizes. Screenshot this message for proof.".format(ctx.message.author.id))
if number == "":
await bot.say(":THINKING: How will you win anything if you don't try to guess a number, <@!{}> :THINKING:".format(ctx.message.author.id))
else:
await bot.say(":x: <@!{}> Your Guess was incorrect. You guessed {}. Try again, you could win!!!".format(ctx.message.author.id, number)```
the command works, so does the cooldown, But it gives me an error every time someone does the command when it is on cooldown.
so is there a way to not give me the error and send The command is on cooldown. Try again in {}seconds.
-Thanks
Catch the error (not sure how to do that in py)
i dont see the cooldown message there ๐ค
discord.ext.commands.errors.CommandOnCooldown: You are on cooldown. Try again in 2.94s
it gives me that error
Isn't it message.author.user.bot?
To stop it responding to other bots
Discord.py btw.
Oh wait so it has to be message.author.bot
return
if message.author.bot: return```
thats redundant @rustic axle
yeah
Hey the last time I programmed in python was like 3 years ago okay ๐ข
I'll do it fam
MENTIONING MODERATOR REEEEEEEE
so?
@unborn spoke
Ayyyyyyy
yay
It can talk
I had to
๐
After 4 tries
5*
If my bot (written in NodeJS) returns text, how can I gather said text?
Here is an example of what the return looks like.
I would like to set the return as a variable.
wdym
/build/upload?assetTypeId=13&groupId=1220996&uploadedId=2361815370
That is what it returns.
Do you understand now? @west raptor
whats your code
roblox.uploadItem(`${name}`, `${type}`, fs.createReadStream(`./${approval}`), 1220996);
That is what calls is.
ROBLOX.js is the lib
whats name, type, and approval
@west raptor they are variables
@night imp I want to grab the text (that text is the output of my code)
๐ฆ
ok
so
who can help me ?
whats the error
whats the issue
like
^
do you get an error
what does it not do...
be specific
what is it not doing
also, smh you leaked your youtube api key
omg
...
.....
reset
did you even write that code @earnest phoenix
or did you copy it
copy it
lol
also, you literally told everyone here your youtube password
xD
yas
so

sad
not joke
are you just trolling
im tempted to ping a mod
this is def a joke
LOOK
.
this server for free code
im not joke -_-
ew
a server that pings you for d.js code
disgusting
should i ping a mod ๐
lol
@earnest phoenix go to a bot channel like #commands or #265156322012561408 pls
@earnest phoenix
please stop
@queen sentinel
what it do
big spam

thank
welp
inb4 dm's



BAN HAMMER
