#development
1 messages · Page 484 of 1
Not sure if this fits here, but can someone help me with a bot hosting related query?
I don't know, can they? 
Hopefully 😂
Well, I'm trying to host my own modmail bot. Which I've managed to do successfully on my hosting using a batch file to run npm start (I know nothing about this stuff btw, I'm learning as I go). I heard pm2? is the way to go to keep the .js app alive??? But I can't quite work out how to work it.
Use a server host
For example, I've taught myself so far, that using CMD and navigating to the bot folder, then typing npm start will start it up
I'm using my Shadow currently
Whilst I test things
It's going to stop running after you kill a terminal
No
use pm2
Excuse my naivety
@sick cloud what about after a terminal is killed
Like I said, I know nothing about this stuff - so I'm sponging as I go
@west raptor pm2 stays
wut
until the server/platform reboots
daemon process right?
I use forever
Do I need to be in the bot directory in cmd before using that?
The issue I have with this bot, as well, is I don't know what the .js file is that I need to start
your main file
Like I said, to start it before - I just browse to directory in cmd and then type npm start
I don't know what the main .js file is :\
Tried that
@elder cobalt open up package.json
He may not have defined one
or is the default index.js
It's not a bot I made
Ohh
Ye i can't make my bot start up
Lemme get it real quick
ok
Wait it doesn't have an error, but it doesn't start up either
Ok
wut
What is the start file
do you know how to turn it on
in other words main file that has the bot.login(config/botcinfig.token)
index.js
What language?
English
Oh .js
Ah
@meager stirrup what js lib
Not sure if it's the issue, but change your start script to node ./src/index.js
do node index.js
@lusty dew stop it, your not being helpful 
since it's the relative path
I did that but it still doesn't start up
@meager stirrup what js lib are you using
@frigid bone who are you talking to even
different person
What do you mean js lib?
Discord.js
ok, how do you start your bot and what happens in console
Anyways, ignore what I said earlier. Can I see your console output, @meager stirrup?
smh
Lol
honestly you people this morning, seriously
It's like 2am pls 
It's the afternoon m8
Well for me it is
So do you want my first command that I have in the Index.js file?
No, show me how you're trying to start the bot (eg node . in cmd) and the output you're getting there, if any
@meager stirrup no
there is none
Can you provide a screenshot?
sure, just a sec

your index file is stuffed
hmmmm can I see the contents of index.js?
yeah it would error out otherwise
const Commando = require('discord.js-cammando');
const bot = new Cammando.Client();
const TOKEN = 'Not for you guys to know'
bot.registry.registerGroup('simple', 'Simple');
bot.registry.registerDefaults();
bot.registry.registerCommandsin(__dirname + '/commands');
bot.on('mesaage', function(message){
if(message.content == 'Ochaco Uraraka')
{
message.replay('H-hey Uraraka!');
}
});
bot.on('ready', function(){
console.log('Ready');
})
bot.login('TOKEN');
const prefix = ">";
client.on("message", (message) => {
// Exit and stop if it's not there
if (!message.content.startsWith(prefix)) return;
if (message.content.startsWith(prefix > "Bakugo")) {
message.channel.send("Um, Yeah.. Im outta here!");
} else
if (message.content.startsWith(prefix > "Plus")) {
message.channel.send("Ultra!");
}
});
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log('Ready!');
});
client.login('Not for you guys to know');
wow
haste bin
Fuck you Tony
my eyes
GO suck a dick
um
Ok how are there no errors
That makes sense
yeah wtf
its using commando but not being logged in or anything
Seriously stop being a dick and people won't be a dick back
2 clients and stuff
oof
cammando
guys, cool it
I am always the bad guy
@hushed berry can you just mute pls
he's trying to help m8
rule 1 😤
@lusty dew because you ARE the bad guy
none of your business
If you're using commando, which I assume you are, here's a nice guide with code examples @meager stirrup
https://github.com/discordjs/Commando-guide
No go about your day
no
and I will go about mine
.
don't tell me to shut it
You have several mistaes in your code, compare it with the guide and fix them
I'm not sure why you're not getting any errors in the console though
oh god idk what to click on that website XD
Compiler should've errored out on the second line
oh nvrm
I kinda want to create a web interface for my bot but I'm not sure how to use the API to get user information because I have literally no clue, I made an identify scoped application and I can get the code from it but how do i actually use it
@slim heart after you exchange the code for an access token, you can call endpoints like /users/@me and /users/@me/guilds with it
So how do i call it
just like with the bot, but with the access token instead
Like I saw the examples in the discord documentation but i cant find anything for js
Oh i see
Like i tried using the one there and it just says a bunch of errors and weiufndwqwq
like this?
CLIENT_ID = 'as'
CLIENT_SECRET = 'as'
REDIRECT_URI = 'https://'
def exchange_code(code):
data = {
'client_id': CLIENT_ID,
'client_secret': CLIENT_SECRET,
'grant_type': 'authorization_code',
'code': code,
'redirect_uri': REDIRECT_URI,
'scope': 'identify email connections'
}
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
r = requests.post('%s/oauth2/token' % API_ENDPOINT, data, headers)
r.raise_for_status()
return r.json()```
i censored the stuff but yea
That's a python example
thats py
Thats what i was saying where the JS one
man you dont need a js example
You have to make that on your own
cuz im generally new to http request
Use an ajax client to make the requests
There are a handful of good ones out there
HELLO where i can get code
Reverse speech
LIKE HELLO
OLLEH
WHO HAVE THIS
nice, can't even wait a single fucking minute until you run out of patience 
-.-

Okay... so I already can rule out my code as the cause of this but can anyone help me? I have 2 bots. They have the same exact code but 2 different tokens. One when I use it to play a song works. The other one however can not do this for some reason. The node process(es) just terminate with no exit code whatsoever. Could it possibly be that node_modules is the one to blame? I don't think so because they are the exact same. However, one is running off of a server (the one that works) and the other one is running off of my computer (this one doesn't work)... wow thats a wall of text lol
@earnest phoenix use a for statement and go backwards indexing each letter to a variable which will be printed and sent
since the machine is the only difference, maybe it's something with OS compatibility or you don't have all prerequisites installed 
I mean, there's got to be an error you can catch
nope
already tried on all of the code
and I know where it terminates
I dont know why tho
You can't tell me that it's exiting with no error code whatsoever and you're handling all errors 
That just doesn't happen, I'm afraid
catch an entire codebase 
if you send the error it might be easier to help you
The problem is that there is no error
It escapes node and acts like nothing happened 
has to be a code problem then
How
how do I find out my discord ID?
two bots same code.... one works one doesnt
or am i being dumb and its the #'numbers'
"discord id" is too vague, since everything on discord has ids
you have to be more specific
@meager stirrup
on developer mode
There
np
Easier way is \mention
no
@smoky spire
and that will only apply to members, plus that way you mention that member
[#development](/guild/264445053596991498/channel/272764566411149314/)
¯_(ツ)_/¯
Said it was easier not better
It's not easier
'discord.js' is not recognized as an internal or external command, operable program or batch file.
hmm
node pls
That's your opinion
I have it installed
o
That would give a different error
IK
how are you even running it
I give up
that's just windows saying "no discord.js executable"
How are you starting the node process?
node index.js
sounds like you're doing process.exec("discord.js") or something
const Discord = require("discord.js");
huh that's weird
Is it in your node_modules?
Show
So im trying to learn a new language for coding bots I already know JS what language is the easiest for bots
html
No 'easiest' language
Really
Doubt there's an html lib
im joking lul
Please tell me there is a batch library for all of us true coders
it should be possible
bet
I prefer to code my bots in pure CSS, thank you very much
remember the "entire star wars movie in your cmd via telnet"?
p2p network using batch
did you actually? the entire movie is like 6 hours long
I left it running in the background, but yeah
wow, congrats on wasting your life watching the movie many times
Works nicely as a screesaver
okay Im now getting an error
~module.js:550
throw err;
^
Error: Cannot find module 'C:\IzukuMidoriyaBot\indez.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3~
XD i put in the wrong command in terminal
okay so I put the right one in, to start up the bot, it doesnt give an error, but the bot doesnt start up
confusion
@rustic axle can you make Reverse speech cod for me ?
that will be 125 BTC
lol
jk
And for constant streaming I should use opusscript right not node-opus
And I realised what the issue was
YTDL was attempting to stream off of localhost which the bot couldn't access so I just got rid of it and blocked it from using localhost ports
really strange
If I don't give a time length for a mute, what should be the default time?
Perm mute?
Because its a toggle right?
whatever you want lol, a day, an hour, a week, a month, permanent
What would be a good default
although if default is perm, you'll probably forget someone and leave them permanently muted lmao
A MILLENNIA?
30 mins, 1 hour, 1 day, 1 week are good increments...
mute everyone every 2 minutes for 1 minute. so everyone can only speak 1 minute at a time
Funny
hello
.
var prefix = "-";
const fs = require('fs');
const db = fs.database();
client.oN("message", message => {
if (message.content === "setprefix") {
if (message.author.id !== "274923685985386496" && !message.member.hasPermission("MANAGE_GUILD")) return message.channel.send(`U don't have permission to do that`);
let args = message.content.split(" ").slice(1);
let arg = args.join("").substring(message.length)
if (!arg) return message.channel.send(`Please add a prefix after command like \`\`${prefix}setprefix &\`\``);
fs.database().ref('servers/' + message.guild.id).update({
guildname: message.guild.name,
guildprefix: arg
}).catch(function(err) {
message.channel.send(err + "\n\n\n");
});
message.channel.send(`prefix updated ${arg} for ${message.guild.name}`);
}
});
this code allowed ?
it won't work
you cane change you prefix my bot in your server to Specific prefix
@inner jewel yas work im test on another bot
client.onnotclient.oNif (message.content === "setprefix")+let args = message.content.split(" ").slice(1);
you won't ever have any args
How do I grab a file then send it back for discord.js ?
IDK
🤔
how much ram do you have?
so I have everything set up correctly, cause i get no errors.... but when i put in "node index.js" it doesnt turn on my bot.... any suggestions on what im doing wrong?
wait i think i know
brb
how do I fix the name? I never changed it
👌
Whilst trying to do set up oauth2 i run into this, any idea how to fix, i googled it and its just a bunch of mumble jumble to me
wait how do I turn off my bot again?
ctrl + c
how would i remove certain elements from an array? like if i wanted to remove all " "
js btw
use array.splice
? how would that work?
how do I turn off my bot? Cause for some reason ctr+c wont work
but if i wanted to remove elements that are certain things? like all " "
you iterate over every item to check
@meager stirrup go to terminal and do ctrl+c
if it is the item you want, then you splice
ah
I did Dream, but it didnt work
http://prntscr.com/ktr66z js let evalEmbed = new RichEmbed() .setTitle('Eval Completed') .addField('Input', ` \`\`\`js ${code} \`\`\` `) .addField('Output', ` \`\`\`js ${evaled} \`\`\` `) .setColor('#2ee51d') msg.channel.send(evalEmbed); why does this return @livid ginkgo eval msg (btw i use embed builders because i am lazy)
const code = args.join(" ")
if (!code) return msg.channel.send('I can\'t execute nothing :thonkku:')
let evaled = eval(code);```
args..join?
external from string? ie. "string1" + zws[ ] + "string2"
...
Can you make a bot in Lua?
Ty
It worked 
How can I get user info from discord with the whole discord identify scope, I've already made it and all but and I use this code
const data = new FormData();
data.append('client_id', 'a');
data.append('client_secret', 'a');
data.append('grant_type', 'authorization_code');
data.append('redirect_uri', 'https://a');
data.append('scope', 'identify');
data.append('code', 'a');
fetch('https://discordapp.com/users/@me/', {
method: 'POST',
body: data,
})
.then(res => res.json())
.then(console.log);
but it just returns
?code=a:1 Uncaught (in promise) TypeError: Failed to fetch
Promise.then (async)
(anonymous) @ VM62:13
VM62:8 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://discordapp.com/users/@me/ with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.```
(I just replaced all the stuff that isnt permenant with a)
you aren't supplying any authorization access_token to the fetch
well i mean it works i think- so
Is this in the browser or node?
okay, good
you should be doing this on a backend API
That's what I thought you were doing
that's why when I saw fetch(), I was like what..?
Im just trying to get user info so that i can be sure that the user owns the specific server and then they can change mysql data
Right
discords perm value in it how do you know if the user has admin in it
because im very retart and dont know how to do it properly
create a REST API and do that all server-side
I don't recommend handling the discord oauth stuff client-side
personally, I do that, as well as a log of web dashboard bots
I diiiiiiiid
no you didn't
its about stealing tokens it was difficult to follow
question discords api it gives you a perm for the user in the guild "36953089" how do you know if that has admin in it?
whatever anyways- it was still difficult i just have no clue how to use any of this lol
but basically yes spooder
theres no way of doing it client side?
no
^^
go annoy them that you don't understand oauth2
Do it server-side
(╯°□°)╯︵ ┻━┻
Imma just drop this then lol im not ready for that kinda sheet
@boreal acorn #265156322012561408
@slim heart learn how node.js works first
this will be a lot easier once you do that
by that I mean learning about http servers
uwu fun
if i wanted to check how many users are in all the guilds my bot is in combined how would i do that?
Loop through the guilds and use the reduce method
so i just tried setting up a node environment in my windows home pc
turns out npm ci and npm prune both delete npm itself
and i cant use npm again until i reinstall node
am i doing something wrong? lmao
bday help

when do images update for my bots
they still show default pictures
also online status is ???
if i have an array of objects sorted by A-Z, how do i randomly "shuffle" the array contents?
which language
ban
tryna add guild/user count to bot info embed, sends the embed without it, why doe:
case "c|info":
var info_embed = new Discord.RichEmbed();
info_embed.setColor("#D83F3F");
info_embed.setThumbnail(Client.user.avatarURL);
info_embed.addField("Bot Name", "Carbon", true);
info_embed.addField("Bot Version", "1.4.5", true);
info_embed.addField("Bot Library", "Discord.JS", true);
info_embed.addField("Bot Author", "Pyxel#5077", true);
info_embed.addField("Bot UID", Client.user.id, true);
info_embed.addField("Bot Shard", (Client.shard.id + 1) + " of " + Client.shard.count, true);
Client.shard.fetchClientValues("users.size").then(results => { info_embed.addField("User Count", `${results.reduce((prev, val) => prev + val, 0)} Users`); });
Client.shard.fetchClientValues("guilds.size").then(results => { info_embed.addField("Guild Count", `${results.reduce((prev, val) => prev + val, 0)} Guilds`); });
msg.channel.send("", info_embed);
info_embed = null;
break;```
case "c|info":
var info_embed = new Discord.RichEmbed();
info_embed.setColor("#D83F3F");
info_embed.setThumbnail(Client.user.avatarURL);
info_embed.addField("Bot Name", "Carbon", true);
info_embed.addField("Bot Version", "1.4.5", true);
info_embed.addField("Bot Library", "Discord.JS", true);
info_embed.addField("Bot Author", "Pyxel#5077", true);
info_embed.addField("Bot UID", Client.user.id, true);
info_embed.addField("Bot Shard", (Client.shard.id + 1) + " of " + Client.shard.count, true);
info_embed.addField("Guild Size", client.guilds.size.toLocaleString(), true);
info_embed.addField("User Size", client.users.size.toLocaleString(), true);
info_embed = null;
break;
Our code style is different, so I might have misspelled it.
try it
@glacial kestrel
Client.guilds gets the current shard only, trying to fetch values from all shards and addem up 
yes
so what is that
user count
or server
you need to post your sever count via api

oh
okey
@earnest phoenix https://discordbots.org/api/docs
I'm looking right now
got it
was sending the embed before the promises could finish
Unicode iirc
so
<message>.react('👌')
\<emoji>
\1⃣
😂
it works for other 
Any other way
\😄
lol
just uh
😄
okay
0⃣ = 0\u20e3
1⃣ = 1\u20e3
2⃣ = 2\u20e3
3⃣ = 3\u20e3
and so on up to 9⃣
...but 🔟 = \U0001f51f
\u20e3
const Discord = require('discord.js')
const client = new Discord.Client()
client.on('ready', () => {
console.log("Connected as " + client.user.tag)
})
bot_secret_token = "None of yo buiswax"
client.login(bot_secret_token)
so i cant start my bot
is there something wrong with that command?
I made a bot but I runs on my pc so when I power off the PC it’s offline, any tips that are cost effective with hosting?
you can host for 5$ in digitalocean or vultr
@earnest phoenix
yes look in the pins for some hosting options
@meager stirrup how are you running it, are there any errors, etc
@meager stirrup
if you have error send logs,
I had no errors
how are you running it
Like what thing I'm using?
yeah what os, how are you running the code
also, this isnt python, so stop variable_names_like_this
I am using discord.js
and on this line bot_secret_token = "None of yo buiswax" you should not do that, declare it const
Kk
I has a question
How do I define args
so it gets the word
you say
like ~google Dogs
it will get dogs
Thank u so much cuties
Huh
does someone add a command for this https://media.discordapp.net/attachments/385837258768515083/489831322051936313/unknown.png?width=368&height=481
.
i need some help, i would like to make an items list in .json for my bot Geisha, but i don't know how to do that
Why as json though?
maybe the code is complicated.
ez
give a time
yeah 😃
'''try {
if (msg === prefix + 'buy') {
let category = [];
if (!args.join(" ")) {
for (var i in items) {
if (!category.includes(items[i].type))
category.push(items[i].type)
}
}
const embed = new Discord.RichEmbed()
.setDescription("Produits disponibles")
.setColor("#fb0700")
var tempDesc = '';
for (var i = 0; i < category.lenght; i++) {
if (category[i] === items[c].type) {
tempDesc += `${items[c].name} - $${items[c].price} - ${items[c].desc}\n`;
}
}
embed.addField(category[i], tempDesc);
}
message.channel.send({embed})
} catch(e) {
message.reply(e.toString());
}
'''
list.json
{
"item_one": "ItemName1",
"item_two": "ItemName2",
"item_three": "ItemName1",
}
Think as your listing json file
afterwards, specify the presence of this file in the code. like bot-config file
const NameListing = require("./list.json");
a simple example is to send the names as a message;
if (msg === prefix + 'money') {
message.channel.send(NameListing.item_one);
}
or
if (msg === prefix + 'money') {
message.channel.send("The Item One Is: " + NameListing.item_one);
}
or
if (msg === prefix + 'money') {
message.channel.send(`The Item One Is: + ${NameListing.item_one}`);
}
I'm sorry if my English is inadequate and I can't explain.
also, you better make command handler first...
Thanks i go to see it 😊
if (!key[0]) return msg.channel.send("Error: Please tell me a key to redeem!")
let embed = new Discord.RichEmbed()
.setColor("RED")
.setTitle("Checking key...")
.setDescription("Please wait...")
msg.channel.send({embed})
db.fetch(key).then(i => {
console.log("Code redeemed!")
console.log(i)
});```
Key must be a String?
Split returns Array
If this is what you want to know, since didn't really get what you want
ty @earnest phoenix https://i.imgur.com/R00dxDj.png
You're welcome, I didn't even do much...
console.log("Code redeemed!")```
would this work?
you need to make sure with !key.length
cause it could return [] and this actually returns true
member.addRole("488133560386060289");```
member.addRole is not a function
?
author is user
msg.user?
.member
ty
there are two kind of entities, users and members, all accounts have a user but member is per guild (server)
so for instance a DM message won't have .member
consider learning a programming language first before you proceed to bots
oof
then how tf are you planning on even hosting a bot at this point 
R
how old are you?
12


Xd
So... how do I turn on my bot in the terminal, I think I'm doing it right, because It gives no errors.... but it wont turn on either
I have no idea what language your using.
discord.js
node filename
then i did do it right... but It wont turn on, why no errors?
thats confusing
XD
That's something wrong with your code
weird, I'm pretty sure I got it right though...
im no js guy, but what is disableEveryone?
Don't mind that
It disables using @ everyone
Discord.js property
what happens if you run node filename.js in your terminal?
where filename.js is the name of your bot file
He said it didn't work, I'll take his word for it
it gives me no error, but it doesnt turn on
does the terminal return to the idle blinking cursor?
Are you handling process errors.
show the terminal what you see after typing that node command
oof I think I forgot that part

new Client().login(token)
this part is wrong
you're replacing client with something that doesnt exist
mixing client and Client
Right
although const cant be replaced
And even if that was correct, you're reassigning a constant
which means the new client never passed
oof so basically I made an oopsie
yup
just do something like discord = require('discord.js')
and then client = new discord
You can even save a line and destructure
do I put something infront of "discord = require('discord.js')"
const
kk
{ Client } = require('discord.js')
do you need the {} tho?
No
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
No, it just unpacks the module.exports object that is exported
oh i get it now
instead of const discord = require("discord.js"); const client = new discord.Client() you can just do const { Client } = require("discord.js"); const client = new Client()
where do I put the token? (Sorry I'm new to this)
i forgot in my code i had discord.client
Ye I didn't include the login part
Client is a constructor
@quartz kindle I know what you are thinking
You just didn't do it correctly
new (require('discord.js')).Client(options)
yeah i figured
i dont use module.exports so im not familiar with their nuances
Ehm
options means whatever options you want to use, not the literal thing
Are you familiar with node.js and JS?
3 clients jesus
Yes, I've just been lately forgetting some things, it's been awhile since I last did this
¯_(ツ)_/¯
why 3 clients tho
That's for me to know
Again, 
just give him the full code, no shortcuts
else he wont understand
better go line by line
It's hard to type lots on a phone
how about #rules-and-info
Hoping it would be simple node knowledge
@meager stirrup basically you need to do 3 things: require the discord package, create a discord client, and login to discord
I'm hesitant to give full code anyeays.
People need to learn how to do things themselves
Otherwise they'll always be asking every single thing
Lead in the right direction, but I'm not going to hold the spoon for you
yeah
when i said give him the full code, i didnt mean literally, just meant explain line by line instead of creating same line shortcuts
👌
for the discord.js-lavalink how do you send request to lavalink? (like the password and so on)
does it do automaticly or?
I want to create whitelist to some servers and I can get one server id to work
my code
if(message.guild.id !== ‘my server id’) return;
How can I add multiple server ids?
I tried
“ID” || “ID”
if its one server id or if its another
I did that
message.guild.id !== ‘my server id’ || message.guild.id !== ‘my other server id’
^
^ something like this you would do
Basic js, it's only thinking it's a string
if(["array", "of", "ids"].includes(message.guild.id)) would be easier
Np
@earnest phoenix ```if(message.guild.id !== "My server id" || message.guild.id !== "My server id") return;````
I think
Ty
can anyone help me code a bot on mobile pls
you dont
You don't x2
i used an app called "code editor" but note: MOBILES are piece of dogshit, i coded on a phone for 1 month
thanks to my stinking mom she took my pc and i had to code on mobile, which sucked
i got my 4gb 2 core laptop for 500 dollars 
aw...
@stable steeple youcan code a nodejs bot on mobile (android) using code editor app and termux
but warning: it sucks to code on phone
I mean, you could even get a chromebook and get Linux running on it afaik
yes
raze can you help me with that?
i would dual boot arch linux
i need help with the dependencies and others
with windows
@stable steeple what lib do u use?
windows rapes your fucking memory
Yes
openjss
I need to dual boot sometime
i need to do that actually
@stable steeple openjss as discord bot library?
no idk how to import a library, im all new at this
what programming langs do you know?
none, i said im new thats why i need help, i know the names but not how to use them
what apps would you recommend
eeem how are you gonna code if you know nothing?
I recommend learning a language (not on a phone)
tutorials
oh yeah,i'm using discord.js (nodejs) that thing you can get on phone using app called "termux" if you are on android
i used to code on a phone for 1 month
@stable steeple you have a school chromebook or smth?
@stable steeple if you want you can use discord.js cuz i know that as i code my bots in that lib

otherwise you're gonna have to find out by yourself as idk any other lib or so
k
Star
i said idk
nope idk what that is
why would you code a bot in Android
Why
By who
🤔
for a long time
For how long
and why
@topaz fjord because your mom takes you rpc away and you really wanna code no matter what
ask nicely
No you didn't, Theres no way you asked that fast
Does not work
wdym
message.guild.id !== ‘my server id’ || message.guild.id !== ‘my other server id’
won’t work
if(message.guild.id !== ‘my server id’ || message.guild.id !== ‘my other server id’) return;
that
try && instead of ||
idK
uum
!== is if message guild is not that or this
I want it to work in my server and my friends one
like if(message.guild.id === "your id" || message.guild.id === "your id")
No one else’s
that means if message is sent in that guild or this guild do something
not gonna work
wait
what programming language is it
if your doing !==
I tried a lot
you need && in place of ||
okay
cuz its gonna mean the opposite
raze how do i start
teach me senpai
it thinks || is and
That’s &&
raze
but in this situation
raze
its or
discord.js = javascript
who here does python and uses databases or have an economy on their bot
what database to use
make a file named "bot.js" and start coidng
i use file system
file system
lol
after that how do i input it to my discord bot
file system is not rlly a databse thing, but i use that as database cuz its much easier
and i got used to it
like dependencies smthn
@stable steeple just learn to code
database >>>> *
thats why im askibg u
raze dm plz
@stable steeple discord.js
const bot = new Discord.Client()
bot.on('ready', => {
console.log("READY " + bot.user.username)
});
bot.login("your token here")
but uh xd
Please don't use a phone to codr
i already told him that
ik
There is no justifying this
guys pls scroll up
my laptop is pretty much shit but works 
Using a phone to code is simply unacceptable
God forbid you actually try to run the bot on the phone
if you phone does then ur bot will go offline
Glitch 
my bot on the discord website only shows 1 server how do i fix that
What
my bot is in over 100 server bot on the website it only shows 1
post your server count to the dbl api
how do i do that
That's not the right link
shit, pre-typing links failed me
This should work
gotta remember it for later use
Yes
I still don't know how to get an ID of discord.abc.GuildChannel (╯°□°)╯︵ ┻━┻
everyone's telling me to just add .id at the end, so apparently no one knows that there is no such property in GuildChannel, nor the answer itself at this point
In js/discord.js it would be msg.channel.id iirc, but I think you are talking about python
yeah it's easy when you have a channel object
but I need an abstract base class of a guild channel
which is different
and idk how to get an id of that channel from there
@trim saddle might know
uwu skullie
you know how to get an id of discord.abc.GuildChannel?
Scroll up
no shit, cause no one knows
im to nooby to know
uwu hug
Lol
ask danny himself 
https://discordbots.org/bot/486465778103746560
Why it says 1 server?
;-;
post server count
@glossy echo you have to post
Thanks~



