#development

1 messages · Page 1418 of 1

viscid gale
#

im assuming the author of that split the message into bits by " "

#

ohh this is the answer

#

basically, if i had text the quick brown fox, the var args becomes ["the", "quick", "brown", "fox"]

boreal iron
#

Nope based on his example "the" wouldn’t be an element of the array (slice(1))

fathom nymph
#

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

south sinew
#

Does anyone have insight on using eris vs discord js light?

pale vessel
#

Discord.js light takes less memory for me (with some options disabled) than Eris

south sinew
#

Yeah thats what I found, just wondering what other differences there are

normal sage
#

@drifting wedge

modest tartan
#

I got denied 2 times i solved it pls any one tell me all require for approve of bot

south sinew
earnest phoenix
#

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

pale vessel
#

Mom called to eat PepeHands

earnest phoenix
#

Me too

pale vessel
placid grotto
#

Hey, does someone know the code for adding cooldown?

#

(Ping me if you answer please)

delicate shore
#

How can I make my own

#

Library

#

For discord API

pale vessel
#

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

earnest phoenix
#

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

delicate shore
#

Wait , isn't zorotic owner of plexi server

drifting wedge
#

I think so

#

Co owner at least

#

How can I update text in an html page?

#

Like live, no reloading page

pale vessel
#

Use JavaScript

forest mirage
#

<element>.innerHTML = "<p>Something</p>"

drifting wedge
#

What's innerhtml?

forest mirage
#

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

drifting wedge
#

But like how can I update it

#

For example

forest mirage
#

by setting it equal to something

drifting wedge
#

But if I want to change text}

#

?

forest mirage
#

yes..

forest mirage
drifting wedge
#

O ok

#

And how would I like update a checkbox

#

Auto

forest mirage
#

What do you mean by "update a checkbox"

drifting wedge
#

Like make it ticked or untucked

forest mirage
#

oh, <checkbox>.checked = false for unchecked and true for checked

drifting wedge
#

How can I like change a variable from flask without having to reload page?

forest mirage
#

not sure what you mean by flask

drifting wedge
#

Flask is a python web module

#

Like django

forest mirage
#

oh I have no idea

drifting wedge
#

Ping with responses pls

earnest phoenix
#

Why when i try to install a node i get a massive error?

umbral zealot
#

What error?

earnest phoenix
umbral zealot
#

That's not installing node, that's trying to install a module

earnest phoenix
#

Why am I getting this error

umbral zealot
earnest phoenix
#

How can I print what is spoken in the voice ?

#

You mean record it and send it?

drifting wedge
#

How can I update a flask page without reloading it

placid grotto
#

No :c

#

Discord.js :/

bleak glacier
#

oh

placid grotto
#

But thank you anyway

bleak glacier
#

ever heard of something called Google

placid grotto
#

Hmm

#

Kinda

bleak glacier
#

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

umbral zealot
#

Hey I recognize that code 😊

marble juniper
#

there

#

also good explained

#

and its step by step

bleak glacier
valid grotto
#

@drifting wedge Hey, yesterday's issue about my bot being presumably terminated was fixed by disabling the "PRESENCE INTENT" intents, why is this so?

pale vessel
#

Maybe you weren't whitelisted for the intent but you used it anyway

#

Discord doesn't like that

drifting dawn
#

Op

delicate shore
#

Helo me

#

I have been trying for 101010010101 hours

#

I can't connect my npm package to github repo

#

So it comes here

pale vessel
#

Did you add publishConfig to your package.json like it asked you to?

delicate shore
#

Wait what

#

no

pale vessel
#

What

delicate shore
#

no wait

#

"publishConfig": { "registry":"https://npm.pkg.github.com" },

pale vessel
#

Did you even click that blue url in that picture

delicate shore
#

this right?

delicate shore
#

I did this

#

"repository": { "type": "git", "url": "ssh://git@github.com/OWNER/REPOSITORY.git", "directory": "random-stuff-api" },

#

and this

#

as said

pale vessel
delicate shore
#

I read this whole

#

I did what they said

#

Didn't work

pale vessel
#

What do you mean by "didn't work"?

delicate shore
#

Like i did npm publish after doing all things

#

gave no error

#

but it still says no packages published

pale vessel
delicate shore
delicate shore
#

now

#

I am using other one

pale vessel
#

Which is?

#

It asks you to use both

#

(if you mean publishConfig)

delicate shore
#

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

pale vessel
#

I've never even done this

delicate shore
#

ohhh

pale vessel
#

I don't feel the need to

earnest phoenix
#

I have created a giveaway bot but i need to start Giveaway in a single line command only like o!gstart 10m 1w prize

lusty quest
#

iirc you can load a npm package directly from a github repo

delicate shore
lusty quest
#

did you know how to make commands?

earnest phoenix
#

Command is in q/a form

lusty quest
#

if you want it in a single command why just not parse the arguments from the command?

earnest phoenix
#

But i want both

wise quartz
#

how do i make embed pages ? (py)

pure lion
#

Pages or messages?

lusty quest
wise quartz
pure lion
#

Ah

#

Use a reaction collector

wise quartz
#

whats that?

pure lion
#

It depends on what library you're using

wise quartz
#

py

pure lion
#

Go to the docs and search for reaction collectors

wise quartz
#

ok but that cant be all i need for the pages system

#

right?

pure lion
#

That's basically all you need

wise quartz
#

oh ok then

#

ty

#

@pure lion theres no such thing as reaction collectors

pure lion
#

Hm

#

Await reactions?

wise quartz
#

do you understand what i am trying to do?

#

nvm

earnest phoenix
#

What to do now?

rustic nova
#

Enable your intents on your application settings

earnest phoenix
unborn ridge
#

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

earnest phoenix
#

anyone know how i can make an embed say the name of the author and not "undefined"

ebon shard
#

anyone know how to mute that guy who spammed? ^

earnest phoenix
ebon shard
#

yeah just realised

pale vessel
#

Nice pfp by the way

earnest phoenix
pale vessel
#

Message is still there my man

twilit rapids
#

ty

earnest phoenix
#

yeah good point

knotty obsidian
#
[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
pale vessel
#

Is your bot verified?

#

If not, try enabling those intents in your developer portal

knotty obsidian
#

ok

latent cave
#

//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?

carmine summit
#

You didnt login

latent cave
#

You mean the token thingy?

carmine summit
#

Yeah

latent cave
#

I already put that in there

#

But still it gives me this error

carmine summit
#

Make sure its in quotation marks

#

And also, give us the error

latent cave
#

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

earnest phoenix
#

oh

carmine summit
#

Oh

earnest phoenix
#

bot.login("token")

carmine summit
#

You need to make it as string

earnest phoenix
#

it should be like this

carmine summit
#

Inside " "

latent cave
#

UHHHH

#

YES

#

Let's see

carmine summit
#

Also, reset your token

#

Its leaked

#

Lol

latent cave
#

' or "?

#

Oof you're right

carmine summit
#

Its the same

latent cave
#

Uhh

carmine summit
#

But ' is more common

#

Me, myself and I uses '

latent cave
#

Still

carmine summit
#

But they're the same

latent cave
#

Not working

carmine summit
#

Error?

#

Send us

latent cave
#

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

carmine summit
#

Token is undefined?

#

Did you save it first?

latent cave
#

Oof

#

Yes I did before

#

But not now

#

I'll do it?

carmine summit
#

Save it first before you run it

latent cave
#

Ctrl + S

#

Right?

carmine summit
#

Ye

latent cave
#

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

carmine summit
#

First of all

#

Do roblox have an api?

#

Or a webhook

latent cave
#

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?

carmine summit
#

Huh

latent cave
#

Roblox group api

carmine summit
#

Where did you get that

earnest phoenix
#

Ah, i have use roblox api before

latent cave
#

Uhh can I have it?

#

I need it for my military game

#

I'm really sorry for asking

earnest phoenix
#

No, i dont spoonfeed lol

latent cave
#

Thanks C:

earnest phoenix
#
  • its easy too.
latent cave
#

Do you sell it or something?

earnest phoenix
#

Uhm.

carmine summit
#

Can you give me a user id?

earnest phoenix
#

No

carmine summit
#

I need a user id

latent cave
#

Aight I will give you mine

carmine summit
#

I don't really play roblox

latent cave
#

Hold on verifying

#

770066439

#

Alright

#

This is my ID

earnest phoenix
#

@latent cave about the script thing, dm me

latent cave
#

@carmine summit 770066439

knotty obsidian
#

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

teal plover
#

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()

"

knotty obsidian
#

what language is it

#

the example u found

#

and also how did you search to find it

teal plover
lusty quest
#

funny enough, ive worked for the Hosting company that host the servers for Aternos. also your bot probably violate the TOS of Aternos

knotty obsidian
#

why?

lusty quest
#

bcs how aternos works

teal plover
knotty obsidian
#

hm

lusty quest
#

with a bot you could automate that your "server" will be permanent online

teal plover
#

So doing that kind of thing would affect them

knotty obsidian
#

i want it to be right under my hand

#

like i said with the whitelist

teal plover
#

Yh yh what they said in their faq is u can use it on ur phone

#

Just get the website on ur phone

knotty obsidian
#

so the whitelister doesnt need to go to the website and add the person

teal plover
#

Until they make a mobile app

knotty obsidian
#

oh

fathom nymph
#

hey

#

is me

#

dumb kid XD

teal plover
fathom nymph
#

so whats problem?

teal plover
#

He wants to press a button to activate a server on aternos

#

Which do-able but violates tos of aternos

#

So idk

fathom nymph
#

wa-

#

wtf is aternos?!?!?

teal plover
#

Server hosting for minecraft

fathom nymph
#

Ok

amber thistle
knotty obsidian
#

Would it break the rules of aternos if I made it so you can watch the status of my server?
@lusty quest

boreal iron
#

Because the widget URL is wrong and isn’t updating by selecting another one

lusty quest
#

read only should be fine. there are also apis that watch the status of Minecraft servers

boreal iron
#

Just right click on copy URL if you’ve selected the one you wanna use

amber thistle
#

wdym?

#

oh copy the image url?

lusty quest
#

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)

amber thistle
#

i thought the id is already my id

lusty quest
#

also possible that its the uid of your bot (discord)

amber thistle
#

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

boreal iron
earnest phoenix
#

i love our people

lusty quest
#

@drowsy crag we got a spammer

drowsy crag
#

cringe

boreal iron
#

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

tribal siren
#

did someone spam here

#

i just check mod log

amber thistle
#

aight but will it update if my server counts also updates?

boreal iron
#

Yeah it will why shouldn’t it update?

amber thistle
#

aight thanks

lusty quest
#

it will be with a short delay tho

tribal siren
#

green chat

royal aurora
#

lol

knotty obsidian
#

is there a way to make a command that terminates the bot (by terminates i mean stops)

lusty quest
#

js?

knotty obsidian
#

java

#

yes

lusty quest
#

java or javascript there is a difference

knotty obsidian
#

oh

drifting wedge
#

its like having the wrong token kinda

earnest phoenix
valid grotto
earnest phoenix
#

hi

carmine summit
#

mongoose-easy lmao

#

wtf

lusty quest
#

normal mongoose is already easy af.

cinder patio
pale vessel
#

It's 0.0.1 though, weird

rustic nova
#

Imagine asking for help and calling them a clown when you get a response Clown

earnest phoenix
#

xd

#

but the version is 0.0.1

#

and i want to update to 0.0.2

pale vessel
#

Can you try making it 0.0.3 and see what happens?

earnest phoenix
#

i try to update to 0.0.3

#

and i get the same error

atomic vault
#

does some one know to to use 'guildMemberAdd' in node js

pale vessel
#

In node.js?

#

What library?

sand condor
#

wym how to use?

#

you listen to the event

earnest phoenix
#

since it's node

fierce ivy
#

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

pale vessel
#

You never know, last time I saw someone tried using a Discord.io example

cinder patio
earnest phoenix
#

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? :))

tribal siren
#

not quite

blissful coral
#

Not at all

#

What is HG-BB

tribal siren
#

ye wtf is that

earnest phoenix
rich ether
#

@earnest phoenix

earnest phoenix
#

yes

rich ether
#

hmm

tribal siren
#

well i don't see anything bad here

rich ether
#

thats not code

blissful coral
#

^

tribal siren
#

and that's just a result you didn't show a code error

rich ether
#

i need the see the script in order to help

tribal siren
#

ye

earnest phoenix
#

@rich ether

#

code

#

🙂

tribal siren
#

you seem to be noob at coding

earnest phoenix
#

1dk

#

1dk

tribal siren
#

uuuh please don't spam

earnest phoenix
#

1dkkkkkkk

rich ether
#

@earnest phoenix what language do u speak

tribal siren
#

turkish i guess

earnest phoenix
#

$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? :))

blissful coral
#

What language is that

tribal siren
#

that gave me nothing

blissful coral
#

That’s a member count embed

#

But what lang is that

rich ether
#

@earnest phoenix we dont help with malware here

earnest phoenix
#

Help Me!

#

malware ?

tribal siren
#

we can't

sand condor
#

nobody knows what that is

rich ether
#

go make your own ip puller

tribal siren
#

say ur language lmao

rich ether
#

not here though

earnest phoenix
#

FUCK YOU

#

NO HELP

slender thistle
#

They use BDFD

tribal siren
#

oh do they

fierce ivy
tribal siren
#

that makes sense

slender thistle
#

Read the message maybe

fierce ivy
#

message.guild.channels.create('training-' + name, { type: 'text', parent: '782680371455328256' })
.then(channel => {
message.channel.send(I've created the channel);

rich ether
#

what he means by HG-BB hes using that websites api in a self bot its an ip puller

cinder patio
#

Currently you send the message to the channel the command gets sent (message.channel). You need just channel

fierce ivy
rich ether
#

so considered malware

sand condor
slender thistle
#

Wtf is HG-BB

rich ether
# sand condor um

what he means by HG-BB hes using that websites api in a self bot its an ip puller

rich ether
blissful coral
#

Dude you have said it 3 times

#

No need to say it again

slender thistle
#

I asked to clarify what it is and possibly link me to resources that confirm your words

fierce ivy
slender thistle
#

Very (un)helpful

sand condor
#

lmfao

blissful coral
#

bin plz

tribal siren
#

what was that

blissful coral
#

Message event

#

And not using a command handler

tribal siren
#

ok

south aspen
#
  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

tribal siren
#

i myself got my problem

rich ether
#

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:

tribal siren
#
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

rich ether
#

Hg-bb.com past usage-
Back door creation system
IPV4 data intake
IPV6 data intake

slender thistle
#

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

rich ether
#

its not a real site

#

the information i recived isent from a site source

slender thistle
#

Which source exactly

rich ether
#

ever heard of tor

slender thistle
#

Possibly

rich ether
#

its in back door section and ip pullers section

#

past wiki page and in hetrostock

blissful coral
#

can you prove it

earnest phoenix
#

i want to do css in my top.gg so i need help

marsh quail
#

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

earnest phoenix
#

how to use emoji client id

marsh quail
earnest phoenix
#

js

marsh quail
#

oke

#

discord.js?, right?

earnest phoenix
#

yah

marsh quail
#

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

earnest phoenix
#

my bot not send emoji

pale vessel
#

That is Discord.js

earnest phoenix
#

send only name

#

why

#

like

#

:name:

#

not emoji

#

anyone help me

pale vessel
#

Your bot needs to be in the same server as the emoji

earnest phoenix
#

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!!!

pale vessel
#

Can you show your code?

#

What did you put

earnest phoenix
#

but default emoji send but cust. emoji not send

pale vessel
#

Yes, can you show us what you did?

earnest phoenix
#

weit

#

``` message.channel.send(${client.emotes.music} - Now playing ${track.title} into ${message.member.voice.channel} ...);

pale vessel
#

What's client.emotes.music?

earnest phoenix
#

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

pale vessel
#

You need to use the <:id:name> format

#

For custom emojis

earnest phoenix
#

ok

earnest phoenix
pale vessel
#

If it's animated, use <a:name:id>

marsh quail
#

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 !

earnest phoenix
#

u mean the status like LUCA bot

#

@marsh quail

marsh quail
#

please pm me if you can help

#

because im going afk now

earnest phoenix
#

<:782963947577278484:hp_musicdisc>

#

not work

earnest phoenix
drifting wedge
#

how can i see if a str is IN another str?

#

in doesnt work

#

if "pp" in "poop"

earnest phoenix
#

what

drifting wedge
#

js

earnest phoenix
#

yah

cinder patio
#

do you want "pp" to return true or false

drifting wedge
#

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
hollow sedge
#

Yeah

#

Use .includes

#

Lol did you just lose your nitro booster role

eternal osprey
#

hey guys

#

how do i find a discord emoji by id?

young flame
#

is there a way you can have

#

like in a embed

pale vessel
#

Use ```?

young flame
#

i tried it

pale vessel
#

Where did you try it?

young flame
#

in a embed

pale vessel
#

Show code

analog shadow
#

sa

young flame
#

uh ok

silent cloud
#

Hey guys

#

What i can use in my discord.js bot for music (modules)

young flame
#
.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) `);
silent cloud
#

Ytdl+ytdl-discord doesnt working

pale vessel
#

You only have one `?

young flame
#

ytdl crashes alot

pale vessel
#

Wait no

eternal osprey
#

hey basically i have some emoji idss.

pale vessel
#

You didn't put any `

eternal osprey
#

how do i return them as the emoji itsself?

#

782973444463001721

young flame
#

hmmm?

eternal osprey
#

this is the id

young flame
eternal osprey
#

and i want this id to become 😄

pale vessel
#

You need the emoji name, otherwise, you can only generate a link for it

eternal osprey
#

thanks

umbral zealot
young flame
#

OH

#

tyty

#

brb

eternal osprey
#

huh

young flame
#

in your bot

pale vessel
#

That's a unicode emoji

young flame
#

smh

pale vessel
#

It doesn't have an ID

#

Where did you even get that ID

young flame
#

oh yeah

#

for that u just do

#

<emojiname>

eternal osprey
#

okay thanks

young flame
#

custom emojis have the name and id

pale vessel
#

:emojiname:

eternal osprey
#

yeah i do have a cusstom emoji

#

so i should use name + id

young flame
#

you can also do

#

\😄

#

and just put that on your bot

#

also works for custom emojis

eternal osprey
#

aha okay got it!

#

wait how did you get that

#

that's the unicode right?

pale vessel
#

Yes

#

\:emoji: works most of the time to get that

young flame
#

^^^

eternal osprey
#

love you guy!

#

thanks

young flame
#

that should work right

#
\`\`\`Use +[feature] [on/off] to switch between modes!\`\`\`
#

in theory

pale vessel
#

Yes

young flame
#

ok

#

time to modify 6000 lines brb

earnest phoenix
#

ytdl core not play stream why

eternal osprey
#

:crystalheart:

earnest phoenix
upper drift
pale vessel
#

What are you doing

#

Can you show your full code?

upper drift
#

Yes

pale vessel
#

Remove that { embeds: {} } thing

#

That won't work

delicate zephyr
#

it will

#

its because he put embeds and not embed

crimson vapor
#

why are you using a constructor and you aren't acually using it?

pale vessel
#

^

crimson vapor
#

all you are sending is an empty Discord.MessageEmbed()

pale vessel
#

Yeah

crimson vapor
#

at that point just hardcode the embed

umbral zealot
#

It won't because that's not how message embeds work

upper drift
#

Oh

delicate zephyr
#

I mean hes not even using the embed constructor

crimson vapor
#

how did that not error with a random json

delicate zephyr
#

he structures the embed fine

#

until mistyping embeds

pale vessel
#

and he's not assigning it to a variable

#

It's there for no reason

upper drift
#

Then I will re write it.

crimson vapor
pale vessel
#

and that URL doesn't look like it points to a raw image

upper drift
#

Thanks

broken sentinel
#

any good ideas for bot name ?

delicate zephyr
#

friendly reminder to get eslint @upper drift

young flame
#

another question

broken sentinel
#

and somebody to help me make when i use my nuke command the bot to send message "Channel nuked"

young flame
#

hoow do you do commmmand suffixes

#

like

#

+help +h ect

delicate zephyr
#

if(args[1] === 'x')

young flame
#

ohh

#

and then do else if(args ect

delicate zephyr
#

ye

broken sentinel
#

and somebody to help me make when i use my nuke command the bot to send message "Channel nuked"

young flame
#

oki and ty

delicate zephyr
#

i would build and entire system

#

but thats just

#

complicated

#

like 90% of the work i do

broken sentinel
#

Can somebody tell me ?

crimson vapor
#

message.channel.send()?

broken sentinel
#

no it dont work

#

meybe with

#

.then {
message.channel.send()
}

#

i dont know

crimson vapor
#

what is your code rn?

#

send a picture or use code blocks

broken sentinel
#

wait

pale vessel
#

Send the message to the cloned channel instead

#

channel.clone().then(newChannel => newChannel.send(something));

crimson vapor
#

im not sure about clone() but it should just return the new channel so let newChannel = await nukeChannel.clone(); newChannel.send()

broken sentinel
#

thanks

#

i will try

pale vessel
#

Show your code

broken sentinel
crimson vapor
#

no you don't need to clone 2x

idle fossil
#

Bro you do coding for ??

crimson vapor
#

wdym

sand condor
#

define newChannel

broken sentinel
#

@pale vessel i try your code thats the error i ge wait

pale vessel
#

Don't just copy paste

#

channel in your code should be nukeChannel

#

Read the code and understand

broken sentinel
#

:>

#

now it clone

#

the channel

pale vessel
#

Okay, now delete the old one

broken sentinel
crimson vapor
#

put the bottom 2 lines above the delete

#

and remove the first clone

broken sentinel
#

it send message but dont delete the nuked

pale vessel
#

Read

crimson vapor
#

bruh discord took away quote?

#

guess ill do it manually

eternal osprey
#

hey guys i have a quick question

crimson vapor
#

yea

eternal osprey
#
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?

sand condor
#

because move1 is an object and your trying to add something together in your declaration of move2

eternal osprey
#

ooowh

#

okay

broken sentinel
#

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

eternal osprey
#

what

broken sentinel
#

like i enter !purge 10 and it purge 20

#

?

#

why

umbral zealot
#

Javascript is case sensitive

eternal osprey
#

Move 1 : [object Object] | Move 2 : [object Object] it worked

umbral zealot
#

so it's limit not Limit

eternal osprey
#

but its still displaying object object

sand condor
#

because they are objects

eternal osprey
#

is it because all these forms are objects?

#

yeah i thought so

#

so how would i enter those objects?

#

by parsing the json file>

sand condor
#

move1.1 ?

eternal osprey
#

owh yeah i can also use tostring right>?

hollow sedge
#

It's already a string

sand condor
#

it's an object

hollow sedge
#

move1.1 is a string

sand condor
#

which is why it's giving object Object

eternal osprey
#

yeah it worked

#

i had to get to it using [1] and [2]

hollow sedge
#

You mean ["1"]

pale vessel
#

Both work

#

JavaScript just toString()`s it

hollow sedge
#

Ah ok

#

That is weird behavior though

pale vessel
#

Works the same for arrays

young flame
#

okay so

#

im using args to define when they want the feature on and off

#

it send the message again

#

and it's sending the wrong embeDs

hollow sedge
stark widget
#

@young flame if there's no args0, send the first embed and return , else if there's args0 do smth

young flame
#

i have

#

args 0

stark widget
#

See

#

In ur photo that u sent, u don't have args[0] ig

young flame
#

ohh returnnn

#

brb

stark widget
#

Ok

young flame
pale vessel
stark widget
#

No I think

#

U don't need to return anywhere

young flame
#

hmm

stark widget
#

Wait I got a fix

pale vessel
#

You don't need to return, it's else if

#

If it passes that condition, it won't continue

young flame
#

ok

stark widget
#

@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

young flame
#

now when i try to turn a feature on

stark widget
#

See

young flame
#

it send the error embed

stark widget
#

Ur cmd is broke

#

Umm

#

U messed up the code

young flame
#

nah it was working before

stark widget
#

No

#

U gonna get problems later

young flame
#

._.

stark widget
#

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 ^

young flame
#

not sure thats how it works

stark widget
#

It should

#

Smh

young flame
#

and im pretty sure i just had else if defined with no args

stark widget
#

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

lyric hedge
#

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?

stark widget
#

Nope

#

U can

lyric hedge
#

so it is legal?

stark widget
#

I think u can use external emojis

#

So yes

young flame
#

aye

#

im big brainn

stark widget
#

...

#

Ok

lyric hedge
#

ok thanks

stark widget
#

Np

young flame
#

so it couldn't tell if i sent the args at all

#

and just sent the error message

stark widget
#

Ye

young flame
#

ty flaze and minii

stark widget
#

...

eternal osprey
#
            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

slender wagon
#

my lavalink struggles when i play music

young flame
#

uh

slender wagon
#

any fix to get rid of that

young flame
#

is there a way to cache how fast messages are sent in a channel

restive furnace
eternal osprey
#

@slender wagon you have a kinda cool website*

#

just some grammatical mistakes that can be changed.

slender wagon
eternal osprey
#

how did you make the site?

slender wagon
#

i don't think this convo belongs to this channel but feel free to dm me

timber fractal
#
const client = new Discord.Client();

client.on('message', () => {
    if(message.content('shit')) {
        message.delete();
        message.channel.send(`${message.author} | Dont say bad words!`);
    }
});```
eternal osprey
#

okay sorry.

timber fractal
#

why does this not work

cinder patio
#

because message.content is a string, not a function, and you are trying to call it

eternal osprey
#

what's the error

#

@timber fractal

timber fractal
timber fractal
cinder patio
timber fractal
#

oh wait

#

nevermind

eternal osprey
#
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
timber fractal
#

i forgot 1 thing

eternal osprey
#

what is the problem?

cinder patio
#

weatherString is an empty string. tmpWeather is not in the range 0-7

#

You can console log tmpWeather to see what it returns

timber fractal
#
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
cinder patio
young flame
eternal osprey
cinder patio
#

Compare message.content to the string shit

knotty obsidian
#

how can i get a user by mention

young flame
timber fractal
pale vessel
#

Just a little

young flame
#

i'm trying to make it less pink and more red though lol

timber fractal
#

im new 😊

#

ok

young flame
#

but it'll be fine for now

eternal osprey
#
if(message.content === "shit"){
//code

}```
cinder patio
#

nice spoonfeeding

young flame
timber fractal
pale vessel
#

shit

young flame
#
if(message.content === "spoonfeed") {
///heres your spoon feed
}
knotty obsidian
eternal osprey
cinder patio
#

I answered

#

go find it

timber fractal
#
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?
eternal osprey
#

i did not see it sorry

cinder patio
#

because message.delete is a function and you don't call it

timber fractal
#

there is no error it just doesnt work

cinder patio
#

call the message.delete function

timber fractal
#

like message.delete()

#

ok

eternal osprey
timber fractal
#
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
eternal osprey
#

i beg yo

timber fractal
#

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

eternal osprey
#

not like that

#

i meant the error

delicate shore
#

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

timber fractal
#

there is no error

eternal osprey
#

there is

cinder patio
#

There was an error

timber fractal
#

it just doesnt work

broken sentinel
#

Can you help me with my bot name? Give some ideas

timber fractal
#

wjen i try to run it it gives this

eternal osprey
#

i would def support the package

eternal osprey
#

i have never heard of startTyping tbh

timber fractal
#

heheh

#

can somebody help me

delicate shore
broken sentinel
#

Can somebody help me with my bot name? Give some ideas

delicate shore
cinder patio
#

It's dmChannel

#

not dmchannel

timber fractal
eternal osprey
#

a random trivia call? @delicate shore

broken sentinel
#

Can you help me with my bot name? Give some ideas

cinder patio
#

Maybe if you read what I said you would understand

delicate shore
#

It's name is random-stuff-api

delicate shore
old latch
eternal osprey
delicate shore
#

I will work on that

#

Thanks

knotty obsidian
eternal osprey
timber fractal
delicate shore
#

Thanks

timber fractal
#

no problem i like it

#

more thanks to you for making it LOL

delicate shore
#

xD, glad you liked it

eternal osprey
cinder patio
#

Show code

eternal osprey
#

IsBoosted: NaN was the result

cinder patio
#

So the parseFloat function is returning NaN, which means the string you provided to it doesn't contain a number

eternal osprey
#

hmm strange

slender wagon
#

sometimes when i load long playlist my bot throws this error Error: timeout of 10000ms exceeded
does anyone know how to avoid this?

timber fractal
#
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
eternal osprey
eternal osprey
knotty obsidian
timber fractal
eternal osprey
knotty obsidian
#

can someone please help me

near stratus
knotty obsidian
#

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());
young flame
#

hm

#

what are you coding in

knotty obsidian
#

java

young flame
#

ah

eternal osprey
#
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?
young flame
#

well

#

what you coding in

#

._.

cinder patio
#

weather[raid.cell_id] does not contain a number

#

so parseInt returns NaN

young flame
#

^

#

ah

eternal osprey
#

i got it from the page source

young flame
#

java and js looks the same so i always ask

eternal osprey
#

how can they call it if it should return an error?

cinder patio
#

how do java and js look the same lmao

#

Awsome: did you copy that whole code from the page? Or what did you do?

eternal osprey
young flame
#

H

#

discord laG

eternal osprey
#

as that is where they store their variables and info which means less work for me

near stratus
eternal osprey
#

because the website this code is from is functionin without any problems

knotty obsidian
#

HIEP ME

#

bruh am i gonna take long on this short question

cinder patio
#

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.

eternal osprey
eternal osprey
near stratus
eternal osprey
#

okay i will try! Thanks!

knotty obsidian
#
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

cinder patio
#

.getMentionedMembers() returns a List

#

and the List class doesn't have a openPrivateChannel method

#

the error is clear

knotty obsidian
#

well how do i

#

send a message

#

or do i use foreach

cinder patio
#

Get just one member from the List

knotty obsidian
#

how

cinder patio
#

that could work

#

getMentionedMembers()[0] maybe? I don't know how java Lists work

eternal osprey
#

this is the console.log(weather) showing. So can't i just use if statements?

#

damn

cinder patio
#

parseInt(weathers[raid.cell_id]); you try to parse cell_id and not the weather property

near stratus
#

That's how we are

cinder patio
#

raid.weather maybe

eternal osprey
#

i love you! Thanks

cinder patio
#

If weathers[raid.cell_id] is returning the object then weathers[raid.cell_id].weather

#

I'm not sure what you console logged

eternal osprey
#

i just logged weather

modest smelt
#

My help command isnt working

twilit geode
near stratus
twilit geode
#

with what

eternal osprey
#

sadly var tmpWeather = parseInt(weathers[raid.weather]); still returns NaN

#

i am just goin to hardcode with if statements

cinder patio
#

Console.log weathers[raid.cell_id]

twilit geode
#

what about it

cinder patio
#

no don't

eternal osprey
wicked sapphire
#

hardcode is the last thing you want to do

cinder patio
#

It's not guaranteed that dmChannel is actually a DMChannel. You have to create one first with <User>.createDM()

twilit geode
#

do you get an error?

eternal osprey
#

undefined

#

is the result