#development
1 messages · Page 1418 of 1
ohh this is the answer
basically, if i had text the quick brown fox, the var args becomes ["the", "quick", "brown", "fox"]
Nope based on his example "the" wouldn’t be an element of the array (slice(1))
hey
so i have error
callback(message, args, args.join(' '), client)
return```
It said i need define args
I tried that
but it wont work
pls help
Does anyone have insight on using eris vs discord js light?
Discord.js light takes less memory for me (with some options disabled) than Eris
Yeah thats what I found, just wondering what other differences there are
@drifting wedge
I got denied 2 times i solved it pls any one tell me all require for approve of bot
Can anyone help me with the reroll code. As i have created a giveaway bot but it's reroll command is not working
what is not working
Wait I'll send the code here after 15 mins
Mom called to eat 
Me too

Hey, does someone know the code for adding cooldown?
(Ping me if you answer please)
Connect to Discord gateway using WS
Listen for messages and packets
You should receive a gateway hello that has a heartbeat interval
Send a heartbeat to the gateway with that interval
You need to do this to keep the connection between your bot and the gateway alive
Anyone know of an etf parser for golang? I'm trying to find one so I don't have to make my own
Ping me if you reply
Wait , isn't zorotic owner of plexi server
I think so
Co owner at least
How can I update text in an html page?
Like live, no reloading page
Use JavaScript
<element>.innerHTML = "<p>Something</p>"
What's innerhtml?
it's a property of every element
if you don't set it to something it just returns the starting and ending tags of that element
by setting it equal to something
yes..
this
What do you mean by "update a checkbox"
Like make it ticked or untucked
oh, <checkbox>.checked = false for unchecked and true for checked
How can I like change a variable from flask without having to reload page?
not sure what you mean by flask
oh I have no idea
Ping with responses pls
Why when i try to install a node i get a massive error?
What error?
That's not installing node, that's trying to install a module
Why am I getting this error
You're missing dependencies. Check https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/troubleshooting.md for details.
How can I update a flask page without reloading it
yes
for discord.py
oh
But thank you anyway
ever heard of something called Google
Then?
if (talkedRecently.has(msg.author.id)) {
msg.channel.send("Wait 1 minute before getting typing this again. - " + msg.author);
} else {
// the user can type the command ... your command code goes here :)
// Adds the user to the set so that they can't talk for a minute
talkedRecently.add(msg.author.id);
setTimeout(() => {
// Removes the user from the set after a minute
talkedRecently.delete(msg.author.id);
}, 60000);
}
Found this on Stackoverflow
Hey I recognize that code 😊
there
also good explained
and its step by step
noice
@drifting wedge Hey, yesterday's issue about my bot being presumably terminated was fixed by disabling the "PRESENCE INTENT" intents, why is this so?
Maybe you weren't whitelisted for the intent but you used it anyway
Discord doesn't like that
Op
Helo me
I have been trying for 101010010101 hours
I can't connect my npm package to github repo
So it comes here
Did you add publishConfig to your package.json like it asked you to?
What
Did you even click that blue url in that picture
this right?
yes
I did this
"repository": { "type": "git", "url": "ssh://git@github.com/OWNER/REPOSITORY.git", "directory": "random-stuff-api" },
and this
as said
You can configure npm to publish packages to GitHub Packages and to use packages stored on GitHub Packages as dependencies in an npm project.
What do you mean by "didn't work"?
Like i did npm publish after doing all things
gave no error
but it still says no packages published
Did you change these values to real ones #development message
@pale vessel I did that and now i get this error
No , but i am not using that method
now
I am using other one
yes
oh
I have never linked my npm package to github repo
it's my first time doing
and i don't get a thing
I've never even done this
ohhh
I don't feel the need to
I have created a giveaway bot but i need to start Giveaway in a single line command only like o!gstart 10m 1w prize
iirc you can load a npm package directly from a github repo
But it says package published on my repo if someone visits it
..
did you know how to make commands?
if you want it in a single command why just not parse the arguments from the command?
But i want both
how do i make embed pages ? (py)
Pages or messages?
i guess you can check if a argument exist then dont do the q/a
pages like switching the page with reactions
whats that?
It depends on what library you're using
py
Go to the docs and search for reaction collectors
That's basically all you need
Idk whats the problem but i need help
https://media.discordapp.net/attachments/343944376055103488/782874074170785822/Screenshot_2020-11-30_at_3.41.28_PM.png?width=714&height=401
missing gateway intend
Enable your intents on your application settings
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
what are you trying to do?
I was creating a new catagory in my bot
Called applications
I know how to add questions
And set logging channel
But what about deny and approve

I am not able to understand logic to make deny and approve
anyone know how i can make an embed say the name of the author and not "undefined"
anyone know how to mute that guy who spammed? ^
They either left or were banned
yeah just realised
Solved
the person left or was banned
Message is still there my man
ty
yeah good point
[JDA MainWS-WriteThread] ERROR WebSocketClient - WebSocket connection was closed and cannot be recovered due to identification issues
CloseCode(4014 / Disallowed intents. Your bot might not be eligible to request a privileged intent such as GUILD_PRESENCES or GUILD_MEMBERS.)
Exception in thread "main" java.lang.IllegalStateException: Was shutdown trying to await status
ok
//Refering to the Package
var Discord = require('discord.js');
var noblox = require('noblox.js');
var bot = new Discord.Client();
bot.on ('ready' , () => {
console.log('The Bot is Runing')
// Code to Run when the bot lgs in
});
bot.login()
What's wrong in here?
You didnt login
You mean the token thingy?
Yeah
ReferenceError: is not defined
at Object.<anonymous> (C:\Users\Marine sensor\Desktop\discord-roblox-bot\bot.js:48:11)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
oh
Oh
bot.login("token")
You need to make it as string
it should be like this
Inside " "
Its the same
Uhh
Still
But they're the same
Not working
ReferenceError: is not defined
at Object.<anonymous> (C:\Users\Marine sensor\Desktop\discord-roblox-bot\bot.js:48:11)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
Save it first before you run it
Ye
Tank you man
The bot is running now
Do you have any script that I can set a custom prefix for every rank based on roblox group?
For example:
[REC] siavash1345
@carmine summit Sorry for asking that, I've been searching in youtube but didn't find any
Umm Hold on let me see if I can find that
{
"data": [
{
"group": {
"id": 0,
"name": "string",
"memberCount": 0
},
"role": {
"id": 0,
"name": "string",
"rank": 0
}
}
]
}
@carmine summit This is it right?
Huh
Roblox group api
Where did you get that
Ah, i have use roblox api before
No, i dont spoonfeed lol
Thanks C:
- its easy too.
Do you sell it or something?
Uhm.
Can you give me a user id?
No
I need a user id
Aight I will give you mine
I don't really play roblox
@latent cave about the script thing, dm me
@carmine summit 770066439
I'm making a aternos bot (Minecraft hosting website)
and I was wondering is there any way to make the bot get into the https://aternos.org/server/ page and click that big start button?
or maybe even make it whitelist people on command
Well what might work is some kind of "inspect script" possibly with selenium
Personally im not too sure how the script would look like, but im pretty sure u would find plenty online (for ur language of choice)
I found the following online..
"Step 1: find the XPath - Get the XPath of the button: for that right open the page in Chrome click on it and select Inspect element - It will open the html file and right click on the highlighted line and select copy Xpath - Copy the XPath in NotePad
Now that you have the XPath you can select the button via a Python script and query the attributes
Here is a prototype
from selenium import webdriver from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox() driver.get("http://www.youradress.org")#put here the adress of your page
elem=driver.find_elements_by_xpath("//[@type='submit']")#put here the content you have put in Notepad, ie the XPath
button = driver.find_element_by_id('buttonID') #Or find button by ID.
print(elem.get_attribute("class")) driver.close()
"
what language is it
the example u found
and also how did you search to find it
Python
funny enough, ive worked for the Hosting company that host the servers for Aternos. also your bot probably violate the TOS of Aternos
why?
That is true
bcs how aternos works
They rly on ads to allow u to host for free
hm
with a bot you could automate that your "server" will be permanent online
So doing that kind of thing would affect them
Yh yh what they said in their faq is u can use it on ur phone
Just get the website on ur phone
so the whitelister doesnt need to go to the website and add the person
Until they make a mobile app
oh
They said that 2 yrs ago.. soooo
so whats problem?
He wants to press a button to activate a server on aternos
Which do-able but violates tos of aternos
So idk
Server hosting for minecraft
Ok
i choose this type of widget but when i paste
<a href="https://top.gg/bot/724289228686753844">
<img src="https://top.gg/api/widget/724289228686753844.svg" alt="Isla" />
</a>
into my page,it gives me this:
https://top.gg/api/widget/724289228686753844.svg
how could i make it only show the servers count?
Would it break the rules of aternos if I made it so you can watch the status of my server?
@lusty quest
Because the widget URL is wrong and isn’t updating by selecting another one
read only should be fine. there are also apis that watch the status of Minecraft servers
Just right click on copy URL if you’ve selected the one you wanna use
you just need to replace the ID on the url with your bots id. go to the top.gg page of your bot and copy the id
(the id is in the url)
i thought the id is already my id
also possible that its the uid of your bot (discord)
no i mean it isn't displaying only the server count,instead it displays the whole stats
but i choose to display server count only
bruh
Yes because the widget URL isn’t updating if you select a different widget
i love our people
@drowsy crag we got a spammer
cringe
That’s why I told you to right the widget (image) you’ve selected and copy the URL and add it manually into the img src tag
aight but will it update if my server counts also updates?
Yeah it will why shouldn’t it update?
aight thanks
it will be with a short delay tho
green chat
lol
is there a way to make a command that terminates the bot (by terminates i mean stops)
js?
java or javascript there is a difference
oh
discord doesnt let u run your bot if you have the wrong presences enabled
its like having the wrong token kinda
Ah make sense, yeah I'm not actually using the presence intent (I was, but I removed the feature and forgot to disable it). Thanks!
nice!
hi
normal mongoose is already easy af.
You need to increment the version
It's 0.0.1 though, weird
Imagine asking for help and calling them a clown when you get a response 
Can you try making it 0.0.3 and see what happens?
does some one know to to use 'guildMemberAdd' in node js
I have a script that will create temporary channels on demand. How do I get the bot to then post in that channel? I know it returns an id but how do I retrieve it to use message.send?
javascript fyi
You never know, last time I saw someone tried using a Discord.io example
<Guild>.channels.create() returns a promise which contains the newly created channel. So you can do
newlyCreatedChannel.send("content");
Hello. Bot Designer for Discord, I'm using. HG-BB, I made the system. However: There is a problem. Two, if I don't $ nomention, the problem is: It sends 3-4 messages when it logs in and out.
Understand me? :))
not quite
ye wtf is that
@earnest phoenix
yes
hmm
well i don't see anything bad here
thats not code
^
and that's just a result you didn't show a code error
i need the see the script in order to help
ye
you seem to be noob at coding
uuuh please don't spam
1dkkkkkkk
@earnest phoenix what language do u speak
turkish i guess
$nomention
$color[0884d0]
$description[Selamlar <@$authorID> Kişisi Sunucumuza Katıldı. Aramıza Hoş Geldin! Seninle Beraber $allMembersCount Kişiyiz!]
$image[https://i.hizliresim.com/94LNDO.gif]
$thumbnail[$authorAvatar]
Code
Hello. Bot Designer for Discord, I'm using. HG-BB, I made the system. However: There is a problem. Two, if I don't $ nomention, the problem is: It sends 3-4 messages when it logs in and out.
[16:09]
Understand me? :))
What language is that
that gave me nothing
@earnest phoenix we dont help with malware here
we can't
nobody knows what that is
go make your own ip puller
say ur language lmao
not here though
They use BDFD
oh do they
Hmm, it's still posting to the instantiation channel? Does this looks right? Channel is created, just the send isn't going through
that makes sense
Read the message maybe
message.guild.channels.create('training-' + name, { type: 'text', parent: '782680371455328256' })
.then(channel => {
message.channel.send(I've created the channel);
wtf is parent
what he means by HG-BB hes using that websites api in a self bot its an ip puller
Currently you send the message to the channel the command gets sent (message.channel). You need just channel
category
so considered malware
um
Wtf is HG-BB
what he means by HG-BB hes using that websites api in a self bot its an ip puller
what he means by HG-BB hes using that websites api in a self bot its an ip puller
I asked to clarify what it is and possibly link me to resources that confirm your words
doh, brilliant - thanks for the help
just look up hg-bb coding lang
lmfao
bin plz
what was that
ok
client.on('message', message => {
const gif = ["https://media1.tenor.com/images/0bccc455e6793a4bfe0d1b27fef3e661/tenor.gif?itemid=17608658", "https://media1.tenor.com/images/d3f0893d296d19b1fb6201a30619206c/tenor.gif?itemid=7256224", "https://media1.tenor.com/images/ff2dcd44504000e320c21ae5682b5369/tenor.gif?itemid=5749160", "https://media1.tenor.com/images/08dbe414a744f9ce506ca7f33505d9fe/tenor.gif?itemid=17641117"]
const rgif = gif[Math.floor(Math.random() * gif.length)];
let args = message.content.substring(prefix.length).split("test");
switch (args[0]) {
case 'dead':
if(usedCommandRecently.has(message.author.id)) {
const embed = new MessageEmbed()
.setTitle('Cooldown')
.setColor(0xff9800)
.setDescription('The command is on cooldown try again in 5 second');
message.channel.send(embed)
} else {
const embed = new MessageEmbed()
.setAuthor(`${message.author.username} is dead`, message.author.displayAvatarURL())
.setImage(`${rgif}`);
message.channel.send(embed)
usedCommandRecently.add(message.author.id);
setTimeout(() => {
usedCommandRecently.delete(message.author.id)
}, 5000)
}
break;
default:
}
});
is something is wrong with this? the bot keep sending 2 message in 1 command idk why
i myself got my problem
What IP addresses does Hg-bb.com resolve to?
• Hg-bb.com resolves to the IP addresses 104.28.17.206.
Where are Hg-bb.com servers located in?
• Hg-bb.com has servers located in United States.
About - hg-bb.com
Edit Site Info
What technologies does hg-bb.com use?
Web Servers
Nginx
Nginx
Reverse proxies
Nginx
Nginx
hg-bb.com Traffic Summary
Is this your site?
Verify your site's metrics.
Daily Unique Visitors:
n/a
Monthly Visits:
n/a
Pages per Visitor:
n/a
Daily Pageviews:
maybe you have the code on somewhere else
const Discord = require('discord.js');
const Levels = require('discord-xp');
const canvacord = require('canvacord');
module.exports.run = async (bot, message, args) => {
try{
const os = require("os");
const cpu = os.cpus()[0]
console.log(cpu.speed)
const member = message.mentions.members.first() || message.guild.members.cache.get(message.content.split(" ").slice(1).join(" ")) || message.member;
const user = await Levels.fetch(member.id, message.guild.id)
if(!user) return message.channel.send('You have no XP. Send some messages first!')
const neededXp = Levels.xpFor(parseInt(user.level) + 1)
const rank = new canvacord.Rank()
.registerFonts()
.setAvatar(member.user.displayAvatarURL({ dynamic: false, format: "png" }))
.setStatus(member.presence.status)
.setCurrentXP(user.xp)
.setRequiredXP(neededXp)
.setProgressBar("#37e9e3", "COLOR")
.setUsername(member.user.username)
.setDiscriminator(member.user.discriminator);
rank.build()
.then(data => {
const attachment = new Discord.MessageAttachment(data, "RankCard.png");
message.channel.send(attachment);
});
}
catch(err){
console.log(err)
}
}
module.exports.config = {
name: 'rank',
aliases: ['r']
}```
it doesn't do anything
it doesn't log an error
I'm literally not getting shit related to hg-bb.com and the website isn't working for me
Could you at least link the source where you got that from
ofc you wont
its not a real site
the information i recived isent from a site source
Which source exactly
ever heard of tor
Possibly
can you prove it
include it in your tag, <p style="YOUR STYLE HERE"></p>
how can nodejs gets the status of a bot?
just at web not as bot it self
i want to get the same thing as top.gg has
how to use emoji client id
what language (programming one i mean)
js
yah
but can anyone helps me plz,
how can nodejs gets the status of a bot?
just at web not as bot it self
i want to get the same thing as top.gg has
my bot not send emoji
That is Discord.js
Your bot needs to be in the same server as the emoji
already
im so glad i found out how to do subprocess in async, os.system() just freezes my bot when doing commands
proc = await asyncio.create_subprocess_shell(video_to_wav,stdout=asyncio.subprocess.PIPE,stderr=asyncio.subprocess.PIPE)
stdout, stderr = await proc.communicate()
THIS ACTUALLY WORKS!!!
but default emoji send but cust. emoji not send
Yes, can you show us what you did?
weit
``` message.channel.send(${client.emotes.music} - Now playing ${track.title} into ${message.member.voice.channel} ...);
What's client.emotes.music?
config
"music": ":musical_note:",
"queue": ":bar_chart:",
"error": ":x:",
"success": ":white_check_mark:"
}
emojis.json
file
oh i have seen this config in a bot
i think it's of musicium
ok
nope
If it's animated, use <a:name:id>
how can nodejs gets the status of a bot?
just at web not as bot it self
i want to get the same thing as top.gg has
please help me !
this not animated
what
js
yah
do you want "pp" to return true or false
well i want to run code, if its in the arg
client.on('message', message => {
if (message.content === `${prefix}ping`) {
// send back pong!
message.channel.send("Pong!")
}
if ("yo" in message.content) {
message.channel.send("no")
}
});``` this is my code for example
i tried it
Where did you try it?
in a embed
Show code
sa
uh ok
.setDescription(`__Automated Moderation is currently turned **${status}**__\n\n> __Automated feautures:__\n*ghostpings, mass mentions, spam, invite links, badwords.*\n\n \nIf you wnat to enable any of the features just do,\n\n` + `${prefix}[feature] (on/off) `);
Ytdl+ytdl-discord doesnt working
You only have one `?
ytdl crashes alot
Wait no
hey basically i have some emoji idss.
You didn't put any `
hmmm?
this is the id
and i want this id to become 😄
You need the emoji name, otherwise, you can only generate a link for it
thanks
you can escape your backticks with a backspace, so it'll look like:
in your bot
That's a unicode emoji
smh
okay thanks
custom emojis have the name and id
:emojiname:
^^^
that should work right
\`\`\`Use +[feature] [on/off] to switch between modes!\`\`\`
in theory
Yes
ytdl core not play stream why
:crystalheart:

why are you using a constructor and you aren't acually using it?
^
all you are sending is an empty Discord.MessageEmbed()
Yeah
at that point just hardcode the embed
It won't because that's not how message embeds work
Oh
I mean hes not even using the embed constructor
how did that not error with a random json
Then I will re write it.
and that URL doesn't look like it points to a raw image
Thanks
any good ideas for bot name ?
friendly reminder to get eslint @upper drift
another question
and somebody to help me make when i use my nuke command the bot to send message "Channel nuked"
if(args[1] === 'x')
ye
and somebody to help me make when i use my nuke command the bot to send message "Channel nuked"
oki and ty
i would build and entire system
but thats just
complicated
like 90% of the work i do
Can somebody tell me ?
message.channel.send()?
Send the message to the cloned channel instead
channel.clone().then(newChannel => newChannel.send(something));
im not sure about clone() but it should just return the new channel so let newChannel = await nukeChannel.clone(); newChannel.send()
Show your code
no you don't need to clone 2x
Bro you do coding for ??
wdym
define newChannel
Don't just copy paste
channel in your code should be nukeChannel
Read the code and understand
Okay, now delete the old one
it send message but dont delete the nuked
hey guys i have a quick question
yea
var move1 = require("./pokemonmoves.json");
var move2 =+ require("./pokemonmoves.json");
let var1= raid.move1
let var2= raid.move2
+ `**Move 1 : **${move1} | **Move 2 : **${move2}` + "\n"``` this is a lil snippet i made.
the json file looks like the followingL:
{"1":"Thunder Shock","2":"Quick Attack","3":"Scratch","4":"Ember","5":"Vine Whip","6"``` etc.
right now i am getting these results from this line + **Move 1 : **${move1} | **Move 2 : **${move2} + "\n"
:
Move 1 : [object Object] | Move 2 : NaN
why is this?
because move1 is an object and your trying to add something together in your declaration of move2
Hey yoo why mu purge command dont work good. like i enter !purge 10 and it ourge everything in chat and say perge and random number
thats the code
what
Javascript is case sensitive
Move 1 : [object Object] | Move 2 : [object Object] it worked
so it's limit not Limit
but its still displaying object object
because they are objects
is it because all these forms are objects?
yeah i thought so
so how would i enter those objects?
by parsing the json file>
move1.1 ?
owh yeah i can also use tostring right>?
It's already a string
it's an object
move1.1 is a string
which is why it's giving object Object
You mean ["1"]
Works the same for arrays
okay so
im using args to define when they want the feature on and off
the first part works fine but one you do like feature on
it send the message again
and it's sending the wrong embeDs
Wait a second..why isn't this just an array lol
@young flame if there's no args0, send the first embed and return , else if there's args0 do smth
Ok
do i need return for each time it sends a embed?
What the hell yeah
hmm
Wait I got a fix
You don't need to return, it's else if
If it passes that condition, it won't continue
ok
@young flame check if there's no args 0, and if so then u send the first embed, and return
And u have smth wrong
The thing is, in your code, if someone sends "<prefix>something on", it will send u the on embed
now when i try to turn a feature on
See
it send the error embed
nah it was working before
._.
Uhh
I cant spoonfeed
But
First check if the command is "message-spam"
And if it is, u check if there is args0
And if there's no args0, u send the embed which says if u want to turn it on
And return
Then u check if the args0 equals on
If it does u turn it on
Else if it args0 is off, turn it off
Else send error
@young flame ^
not sure thats how it works
and im pretty sure i just had else if defined with no args
The issue with ur code was that, ur code checked if command was mesaage-spam and then if it wasn't, it checked args0
That was a lot of typing ngl
Hey, i have only question about Discord Api TOS.Is that true, that i can not use server emojis (where is my BOT) on other servers, (where is my BOT) , until is my bot on 20 servers?
so it is legal?
ok thanks
Np
i had the error message before the args
so it couldn't tell if i sent the args at all
and just sent the error message
Ye
ty flaze and minii
...
var weatherString = "";
var tmpWeather = parseInt(weathers[raid.pokemon_id]);
switch (tmpWeather) {
case 0:
weatherString += "None";
break;
case 1:
weatherString += "Clear";
break;
case 2:
weatherString += "Rainy";
break;
case 3:
weatherString += "Partly Cloudy";
break;
case 4:
weatherString += "Cloudy";
break;
case 5:
weatherString += "Windy";
break;
case 6:
weatherString += "Snow";
break;
case 7:
weatherString += "Fog";
break;
default:
weatherString = "";
break;
}``` i have taken this info from nycpokemap.com. I am basically trying to later on call the weather boost: + `**IsBoosted: **` + ` ${weatherString}` + "\n"
it basically is not returning anything
my lavalink struggles when i play music
uh
any fix to get rid of that
is there a way to cache how fast messages are sent in a channel
get better vps
@slender wagon you have a kinda cool website*
just some grammatical mistakes that can be changed.
thank you lol, everything is still in beta and almost everything will change
how did you make the site?
i don't think this convo belongs to this channel but feel free to dm me
const client = new Discord.Client();
client.on('message', () => {
if(message.content('shit')) {
message.delete();
message.channel.send(`${message.author} | Dont say bad words!`);
}
});```
okay sorry.
why does this not work
because message.content is a string, not a function, and you are trying to call it
it just doesnt work
but in other scripts it works

var weatherString = "";
var tmpWeather = parseInt(weathers[raid.pokemon_id]);
switch (tmpWeather) {
case 0:
weatherString += "None";
break;
case 1:
weatherString += "Clear";
break;
case 2:
weatherString += "Rainy";
break;
case 3:
weatherString += "Partly Cloudy";
break;
case 4:
weatherString += "Cloudy";
break;
case 5:
weatherString += "Windy";
break;
case 6:
weatherString += "Snow";
break;
case 7:
weatherString += "Fog";
break;
default:
weatherString = "";
break;
}```
i have taken this info from nycpokemap.com. I am basically trying to later on call the weather boost: + **IsBoosted: ** + ${weatherString} + "\n"
it basically is not returning anything
i forgot 1 thing
weatherString is an empty string. tmpWeather is not in the range 0-7
You can console log tmpWeather to see what it returns
const client = new Discord.Client();
client.on('message', message => {
if(message.content('shit')) {
message.delete;
message.channel.send(`${message.author} | Dont say bad words!`);
}
});``` why is this not working
and how u got that colors
because message.content is a string, not a function, and you are trying to call it
@pale vessel you like the pfp ?
what do i have to do than?
that looks good asf
Compare message.content to the string shit
how can i get a user by mention
i did some edits witht he colors ect
wait what i dont get it
Just a little
i'm trying to make it less pink and more red though lol
but it'll be fine for now
if(message.content === "shit"){
//code
}```
nice spoonfeeding
thats enough for me lol
how u get that colors
shit
oh hot
Why is it red
https://gyazo.com/842f6c1bf476481b9e4eff41631f82ad
anyone that knows the answer yet 
const Discord = require('discord.js')
const client = new Discord.Client();
client.on('message', message => {
if(message.content === 'shit') {
message.delete;
message.channel.send(`${message.author} | Dont say bad words!`);
}
});``` why this still doesnt work?
because message.delete is a function and you don't call it
there is no error it just doesnt work
call the message.delete function
maybe brushing up some basics would do good huh?
const Discord = require('discord.js')
const client = new Discord.Client();
client.on('message', message => {
if(message.content === 'shit') {
message.delete();
message.channel.send(`${message.author} | Dont say bad words!`);
}
});``` this still doesnt works
Show your console please
i beg yo
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\Lucas\Desktop\discordbots\Dinosaur> node .
[ReactionRole] Fetching messages...
[ReactionRole] Fetched messages, system is ready!
(node:868) UnhandledPromiseRejectionWarning: CanNotFetchMesssage: DiscordAPIError: Unknown Message
FOR MORE ADVANCED HELP: https://discord.com/invite/BjEJFwh
at new SuperError (C:\Users\Lucas\Desktop\discordbots\Dinosaur\node_modules\reaction-role\dist\struct\SuperError.js:20:28)
at C:\Users\Lucas\Desktop\discordbots\Dinosaur\node_modules\reaction-role\dist\struct\Core.js:317:71
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:868) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:868) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
this
with a sneaky invite link inside
I'm working on a npm package for fellow js developers. Npm package is a module that makes coding easier. For eg discord.js itself is a npm package and is quite explanatory. So I'm making an API which will kind of makes other people's work easier
It currently has these features - api.joke() // Returns a dad joke api.cnjoke() // Returns a cn joke api.devjoke() // Returns a dev joke api.insult() // returns a random insult api.vase() // returns a vase image api.cat() // returns a cat image api.dog() // returns a dog image api.duck() // returns a duck image api.aww() // returns a cute moment or picture api.meme() // returns a cool meme :) api.dankmeme() // returns a dank meme api.facepalm() // returns a facepalm moment
I can't think of some more features to add in it
Can you guys leave suggestions
Thanks and sorry for my bad English
there is no error
there is
There was an error
it just doesnt work
Can you help me with my bot name? Give some ideas
wjen i try to run it it gives this
that is a really good idea man!
i would def support the package
can i install it already?
i have never heard of startTyping tbh
Thanks mate , it's already released publically. I couldn't think of more features to add
Can you suggest some if you are fre
Can somebody help me with my bot name? Give some ideas
Yes
COOL what is the name?
a random trivia call? @delicate shore
Can you help me with my bot name? Give some ideas
Maybe if you read what I said you would understand
It's name is random-stuff-api
Sure ! That's actually a superb idea
your bot's name is something very personal in my opinion, try to get one yourself
Be creative. Whats the theme?
Why is it red
https://gyazo.com/842f6c1bf476481b9e4eff41631f82ad
np!
cool im gonna install
Thanks
xD, glad you liked it
i tried what you said, and instead of calling weatherstring, i called the tmpweather.
Show code
IsBoosted: NaN was the result
So the parseFloat function is returning NaN, which means the string you provided to it doesn't contain a number
hmm strange
sometimes when i load long playlist my bot throws this error Error: timeout of 10000ms exceeded
does anyone know how to avoid this?
const Discord = require('discord.js')
const client = new Discord.Client();
client.on('message',message => {
if(message.content('shit')) {
message.delete()
message.channel.send('Dont say bad words!')
}
});``` why this doesnt work
but how is that possible, and how can i even fix that?
show your log once again, i saw an error in there
https://gyazo.com/61b6156211512a9c702b34550dd7359f
why doesnt this work ;-;
JAVA
Try
message.content === 'shit'
okay
that doesn't matter, does it?
can someone please help me
no just making sure
https://gyazo.com/61b6156211512a9c702b34550dd7359f
why cant i do this
it says cant resolve openprivatechannel in 'list'
event.getMessage().getMentionedMembers().openPrivateChannel().queue(channel -> channel.sendMessage("You have been whitelisted in the `NastolgaCraft.aternos.me` server, come join when it's online!").queue());
java
ah
var weatherString = "";
var tmpWeather = parseInt(weathers[raid.cell_id]);
console.log(tmpWeather)
switch (tmpWeather) {
case 0:
weatherString += "None";
break;
case 1:
weatherString += "Clear";
break;
case 2:
weatherString += "Rainy";
break;
case 3:
weatherString += "Partly Cloudy";
break;
case 4:
weatherString += "Cloudy";
break;
case 5:
weatherString += "Windy";
break;
case 6:
weatherString += "Snow";
break;
case 7:
weatherString += "Fog";
break;
default:
weatherString = "";
break;
}``` the first console.log returns NaN why is that?
java and js looks the same so i always ask
how can they call it if it should return an error?
how do java and js look the same lmao
Awsome: did you copy that whole code from the page? Or what did you do?
i did only copy the snippet i sent
help?
as that is where they store their variables and info which means less work for me
It isn't returning an Integer so parseInt is returning NAN
yeah i know, but my question is why,
because the website this code is from is functionin without any problems
the problem is inside weather[raid.cell_id]. It just doesn't contain a number. That's it. We can't help you with anything else.
no-one is gonna help you with this attitude.
okay thanks! You guys did a great job with figuring this out!
Just give a console.log before the parseInt
okay i will try! Thanks!
event.getMessage().getMentionedMembers().openPrivateChannel().queue(channel -> channel.sendMessage("You have been whitelisted in the `NastolgaCraft.aternos.me` server, come join when it's online!").queue());
It says Can't resolve method 'openPrivateChannel' in 'List'
I'm using java
Ples help idk why but it's probs just me being dum
.getMentionedMembers() returns a List
and the List class doesn't have a openPrivateChannel method
the error is clear
Get just one member from the List
how
this is the console.log(weather) showing. So can't i just use if statements?
damn
parseInt(weathers[raid.cell_id]); you try to parse cell_id and not the weather property
That's how we are
raid.weather maybe
i love you! Thanks
If weathers[raid.cell_id] is returning the object then weathers[raid.cell_id].weather
I'm not sure what you console logged
i just logged weather
My help command isnt working
what is your code
no Code no Help
with what
sadly var tmpWeather = parseInt(weathers[raid.weather]); still returns NaN
i am just goin to hardcode with if statements
Console.log weathers[raid.cell_id]
what about it
no don't
okay
hardcode is the last thing you want to do
It's not guaranteed that dmChannel is actually a DMChannel. You have to create one first with <User>.createDM()
do you get an error?



