#development

1 messages ยท Page 899 of 1

winged gull
#

i dont use python so idk, but should be something along the lines of counter = 0 and then counter++
@quartz kindle when i use this out of function it doesn't work and when i use inside the function count continues on 0

quartz kindle
#

well idk then i dont use python

proper mist
#

now it says guild isn't defined

#

do i just do
var = guild;

quartz kindle
#

dont remove the msg part lol

#

you still need to get the guild from somewhere, so msg.guild gets it from the message

earnest phoenix
#

review my bot

#

.

quartz kindle
#

bot reviews take a few days up to 2 weeks

proper mist
#

sorry this is a bit noobish question but how do i define guild

#

var guild = [what]

quartz kindle
#

you dont need to

#

you just get it from the message like you had before

proper mist
#

uh..

earnest phoenix
#

@quartz kindle what's your bot

#

can I get a url?

proper mist
#

welp im a noob programmer

quartz kindle
#
client.on("message", msg => {
  msg // this is your Message object
  msg.guild // this is the Guild this Message was sent in
  msg.channel // this is the Channel the message was sent in
  msg.guild.channels // this is the channels that exist in the guild where the message was sent in
  msg.guild.channels.create() // this creates a channel in the list of channels that belong to the guild where the message was sent in
})```
earnest phoenix
#

what's your bot url

proper mist
#

oh ok

#

that's how u define a variable

quartz kindle
#

@proper mist thats not defining a variable, thats just making use of a structure that already exists

#

its called Object Oriented Programming

#

you can however define variables using that structure as you want

proper mist
#

ok

#

I have that

quartz kindle
#
let guild = msg.guild // define guild as the guild where the message was sent in
let channels = msg.guild.channels // define channels as the channel manager of the guild where the message was sent in
proper mist
#

This is my code

#
client.on('message', msg => {
    if(msg.content.startsWith('/channels')){
      let channelname = msg.content.slice('/channels'.length); // cuts off the /private part
      msg.channel.send("Creating 50 New Text Channels Named: " + "**" + channelname + "**")

    var i;
    for (i = 0; i < 50; i++) {
    setTimeout(() => {

        guild.channels.create(channelname,{type: 'text'})
        .then(console.log)
        .catch(console.error);

    },1*1) //3 seconden
    }
    }
#

and when i use the command

#

it says that guild is not defined

earnest phoenix
#

because it isnt

#

its msg.guild

quartz kindle
#

did you not understand what i just said?

clear haven
#

Hello, I was wondering how I could put a photo on my bot, the image is corrupted ๐Ÿ˜”
Sorry i'am brazilian, my english is bad

proper mist
#

i do understand

regal saddle
#

You mean, put a picture as pfp?

quartz kindle
#

then your error should be self-explaining

clear haven
proper mist
#

Thank you @quartz kindle

#

It worked :D

quartz kindle
#

๐Ÿ‘

neat ingot
#

what do you guys reward your bot users with for voting/donating?

unique nimbus
#

Premium Commands

#

or if their is economy

#

maybe a bonus

neat ingot
#

define 'premium' ๐Ÿ˜›

unique nimbus
#

Something which you can't use without voting

#

or donating

neat ingot
#

yea, but what kinda command might that be

unique nimbus
#

Anything ngl

#

except help

neat ingot
#

lmao

unique nimbus
#

Does your bot have economy

neat ingot
#

player: help
bot: please donate for help

unique nimbus
#

yes

neat ingot
#

๐Ÿ˜„

proper mist
#

has msg.guild.channels.forEach
been updated in discord.js v12? if so, what has it been updated to

quartz kindle
#

channels.cache.forEach

neat ingot
#

yea, my bot has resources, gold, gems, special shards, metal, etc etc... i have tons of things i can offer as voting rewards. just not sure what people might expect as such rewards

quartz kindle
#

i dont have vote rewards at all

neat ingot
#

๐Ÿ˜ฎ

#

savage tim

quartz kindle
#

i dont wanna force people into voting for no reason

neat ingot
#

but encouragement is always nice ๐Ÿ˜›

quartz kindle
#

are votes even worth anything?

neat ingot
#

hey! where there are virtual internet points/score/displayed integer to be had, i want it, and i want it big numbers!

quartz kindle
#

lmao

#

anyway i dont have any command that could be vote-locked

#

my premium features are locked behind donations

neat ingot
#

yea im not overly keen on locking commands behind votes

#

i'd rather reward users with like, something they can use within the bot

#

my bots a game, so i can easily give items and w.e junk

proper mist
#

channels.cache.forEach(channel =>

quartz kindle
#

yeah i dont have anything like that

proper mist
#

channel not defined pandasad

quartz kindle
#

@proper mist again

#

remember what i told you

proper mist
#

oh xd

neat ingot
#

was just kinda wondering what kinda things others generally reward people with

quartz kindle
#

about the object oriented structure

#

everything comes from somewhere

#

your starting point is msg

#

so everything must start there

proper mist
#

ok

quartz kindle
#

just because i said channels.cache.forEach doesnt mean you should remove the msg.guild part of it

#

because channels.cache.forEach applies to EVERYTHING that can give you a list of channels, which you can get from other places, not necessarily from msg

#

for example when a member joins a guild, you would do member.guild.channels instead of msg.guild.channels because the starting point is different, but the channels.cache part applies all possibilities

neat ingot
#

so then its channels.cache.forEach.msg.guild right? cause iw ant each message in that channel? right?

#

my logic is flawless ๐Ÿ˜›

regal saddle
#

For this you can also look up the js docs dev_blob_shrug

quartz kindle
#

and the v11 -> v12 changes guide

slender mountain
#

um

#

channels.cache.forEach.msg.guild

#

wth is this

neat ingot
#

๐Ÿ˜„

slender mountain
#

what are you trying to do?

neat ingot
#

confuse the newbie tbh

#

๐Ÿ˜„

slender mountain
quartz kindle
#

๐Ÿคฆโ€โ™‚๏ธ

proper mist
#

aa how do u define channels again :v

#

sowwy ;c

slender mountain
#

?

#

what do you mean

proper mist
#
if(msg.content.startsWith('/massnick')){
        let nickname = msg.content.slice('/massnick'.length);
        var i = 0;
        channels.cache.forEach(member =>{
          i++
        }
          )
        msg.channel.send("Changing names of **" + i + "** members to **" + nickname + "**")
        msg.guild.members.forEach(member =>{

          member.setNickname(nickname)
        }
          )
      }
earnest phoenix
#

Anyone know when they are gonna open up verification

proper mist
#

wait no

#

not that

slender mountain
#

@earnest phoenix you mean official discord verification?

#

pretty sure you can already apply for that

neat ingot
#

you can

slender mountain
#

you just need to have your bot in 75+ servers

neat ingot
#

^

proper mist
#
 if(msg.content.startsWith('/massnick')){
        let nickname = msg.content.slice('/massnick'.length);
        var i = 0;
        channels.cache.forEach(member =>{
          i++
        }
          )
        msg.channel.send("Changing names of **" + i + "** members to **" + nickname + "**")
        channels.cache.forEach(member =>{

          member.setNickname(nickname)
        }
          )
      }
#

how do i define channels ;c

hollow saddle
#

But turnaround time currently is probably about a month

#

Uhmmm... that code is... interesting

earnest phoenix
#

@slender mountain no I mean top.gg

proper mist
#

what

slender mountain
#

ยฏ_(ใƒ„)_/ยฏ

earnest phoenix
#

I have already applied for official

slender mountain
#

well this probably isn't the best place to ask

earnest phoenix
#

Ah ok

proper mist
#

welp how do you define channels

earnest phoenix
#

Mb

proper mist
#

im stupid

slender mountain
#

@proper mist are you wanting bot.channels?

proper mist
#

wat

slender mountain
#

or client.channels

proper mist
#

msg.channe

slender mountain
hollow saddle
#

There's so much wrong with that code I don't even know where to begin... I guess I'll start with the most obvious flaw
channels.cache.forEach(member => {
You wouldn't be getting a member from this, but a channel, and even then you wouldn't get a channel because you don't define if it's a guild channel or from the client or anything

slender mountain
#

you mean nothing

#

because channels doesn't seem to be defined anywhere

#

that we can see

#

ye

proper mist
#

uhhh

neat ingot
#

i think he is trying to mass change guildmemember nicknames

proper mist
#

yes

hollow saddle
#

I think so too

#

But like

neat ingot
#

but using the channels instead of members

hollow saddle
#

Dude, learn some js first

#

And take a look at the docs

#

Because channels.cache does not return members

proper mist
#

ok

#

link

#

?

hollow saddle
#

And you have 2 forEach loops for no reason

neat ingot
#
if(msg.content.startsWith('/massnick')){
    let nickname = msg.content.slice('/massnick'.length);
    let count = msg.guild.channels.cache.size;
    msg.channel.send(`Changing names of **${count}** members to **${nickname}**`);
    msg.guild.channels.cache.forEach(member => {
        member.setNickname(nickname);
    });
}```
hollow saddle
neat ingot
#

is likely what you were trying to do

hollow saddle
#

Why you spoonfeeding though

neat ingot
#

sometimes its good to know where he went wrong

#

but yea i do recommend at least doing a few code academy js lessons or something

hollow saddle
#

Even that wouldn't accomplish it though.

    msg.guild.channels.cache.forEach(member => {
        member.setNickname(nickname);
    });

Does not retrun a member

neat ingot
#

ha, fair enough

hollow saddle
#

lol

#

But yes, take some online courses man, it's better to learn before making a bot

neat ingot
#

ive been doing js for years, and thought it'd be nice and easy to make a bot. that was december...

hollow saddle
#

Oh I was referring to @proper mist

#

lol

#

Bots are... difficult to say the least

slender mountain
#

only if you don't know what your doing

neat ingot
#

oh, i know. was just trying to highlight that its not a quick newbie friendly task

slender mountain
hollow saddle
#

Ah

neat ingot
#

lol

hollow saddle
#

Lol

proper mist
#

aa bakc

neat ingot
#

tbf if you only want a bot that replies to a thing, thats pretty easy

#

but when you want it to do some cool things...

hollow saddle
#

^

slender mountain
#

define cool things

neat ingot
#

uhh

#

my bot is an rpg that has little battle embeds that you react to and it does attacks, skills, uses items, kill bosses, farm equipment, upgrade things.

#

you know, cool stuff

valid frigate
#

is there anything similar to pm2 but for apps that run on jvm

proper mist
#

im reading the docs

valid frigate
#

feels like there's a better way to run multiple apps without screen

neat ingot
#

stats and skills and images and such - cool stuff

slender mountain
#

aight ok not too bad

#

ive done hangman, trivia and a mafia game

#

at this point idk what to make

neat ingot
#

goat simulator: discord version

slender mountain
#

lmao

lyric mountain
#

@valid frigate run the app as a service

valid frigate
#

k

neat ingot
#

man new cod update is far too slow ๐Ÿ˜ข

#

anyone need help or something :/

autumn quarry
#

how do you edit an image with a bot?

cursive thistle
#

what library? @autumn quarry

autumn quarry
#

Discord.js

#

javascript if you will

cursive thistle
#

client.user.setAvatar() i think

autumn quarry
#

ah, i see

lavish fern
amber fractal
#

normally means it's deprecated

lavish fern
#

how do i make it not depreciated

cursive thistle
#

you dont..?

lavish fern
#

Deprecated

amber fractal
#

Deprecated means it's deprecated by the developer and wont be supported in future updates

lavish fern
#

well does that mean i cant use it

cursive thistle
#

not necessarily

neat ingot
#

there will normally bea newer more optimized function, which is why it gets depreciated

cursive thistle
#

usually you can but it will likely be removed in the future so you should probably use a different method

#

yeah

neat ingot
#

woudnt a strikethrough like that maybe mean the lib isnt imported or something?

#

idk what ide that is from ๐Ÿ˜›

lavish fern
#

Apache Netbeans

neat ingot
#

some java likely

#

ahh

lavish fern
#

I couldnt get eclipse to work

#

I dont know what dto do

copper cradle
#

you can read their docs

#

and see what happened to that Constructor

#

and its replacement

lyric mountain
#

@lavish fern new JDA().build() is deprecated

#

The new substitute is JDA.create()

#

And don't use netbeans for the sake of your sanity

#

Also, note that you gotta specify which gateway intents you'll want to use

#

JDA.create(GatewayIntent.DEFAULT) is the default way of starting your client

tired cloud
#

if i use

const channelfilter = m => m.mentions.channels.size >= 1;
let options = {max:1,time:60000,errors:["time"]}
let collected = await message.channel.awaitMessages(channelfilter,options);
console.log(collected.size)

and i type: ea instead of #general-chat
it shouldn't be cached by the filter right? Until i actually mention a channel. Right?
So that means console.log(collected.size) should NOT be sent in console until i mention a channel/time expires right? (v11.5.1)

lyric mountain
#

No

#

I guess

tired cloud
#

its actually sent GWsetmyxPeepoWeird

proper mist
#

how do i send a message to all channels using discord.js

lavish fern
#

@lyric mountain I have no idead what you mean

pale vessel
#

sounds like api abuse

lyric mountain
#

You're using new JDA().build() @lavish fern

#

That's deprecated due to new version of discord api requiring gateway intents to be specified

proper mist
#

how do i send a message to all channels using discord.js

#

what is api abuse

oak cliff
#

you dont cause its api abuse

proper mist
#

i just want to notify my members about something

lyric mountain
#

They added a new constructor, which is JDA.create()

proper mist
#

one time

lyric mountain
#

@proper mist ping them

tired cloud
#

i wonder why its still sent if i dont mention a channel

proper mist
#

welp ok

lyric mountain
#

If it's your members, then you should have access to everyone

#

@tired cloud broken filter maybe

#

They added a new constructor, which is JDA.create()
@lavish fern

lavish fern
lyric mountain
#

Remove new

#

JDA.create() is a static method

#

Also, inside create you gotta put GatewayIntents.from(GatewayIntents.DEFAULT)

lavish fern
#

Im still getting errors

lyric mountain
#

Print

lavish fern
#

hmm?

lyric mountain
#

Screenshot

lavish fern
#

And if not Netbeans then what?

lyric mountain
#

Intellij

#

Try GatewayIntent

#

I don't remember if there's a S in the end of the name

lavish fern
#

@lyric mountain i take it your a Java grammer?

#

Still didnt work

tired cloud
lyric mountain
#

@lavish fern have you imported it?

lavish fern
#

yes

topaz fjord
#

that's how how it works thonk

#

.create needs a token as well

lyric mountain
#

Ah, forgot that

topaz fjord
#

it should be .create("token", gateway intents)

lyric mountain
#

Btw, don't put your token as a common string if you wish to submit the bot

lavish fern
#

submit the bot?

lyric mountain
#

Use environment vars for that

lavish fern
#

Enviro what>

lyric mountain
#

Or any other bot listing

lavish fern
#

I havent coded for 7 years

lyric mountain
#

Environment variables

#

They are variables stored in jvm instead of your code

lavish fern
#

Ah

#

dont know how to do that

lyric mountain
#

So they are totally safe even if someone reads your code

#

It's kinda easy

#

At least in intellij

lavish fern
#

should i use that?

lyric mountain
#

Probably

lavish fern
#

whats the difference?

lyric mountain
#

Netbeans is awesome for guis and desktop applications

lavish fern
#

okay

lyric mountain
#

But for everything else it's just not good enough

#

Intellij is a complete coding workspace, so you have more tools at your disposal

#

Although its gui builder is harder to use than netbeans

lavish fern
#

Inteliji work with Java 14?

lyric mountain
#

Intellij is an IDE

#

It works with any version

lavish fern
#

okay

lyric mountain
#

Plus it's not a java-only ide btw

lavish fern
#

cause i current am use JAva JDK 11

spark wing
#

Bruh

proper mist
#

can anyone send me a good resource for economy discord.js

prime cliff
#

Doing an enconomy bot is not really something you should try if you are getting into development imo

lavish fern
lyric mountain
#

Next next next next finish

#

No need to modify anything

#

Then you'll have to choose your preferences

#

Again, next next next next

lavish fern
#

@lyric mountain You know any good tutorials with the new changes to the JDA

lyric mountain
#

Afaik the best tutorial is ctrl + space

#

And reading javadocs

regal saddle
lyric mountain
#

JDA is seriously lacking a wiki

#

But their javadocs are quite well documented

#

Way too well I'd say

earnest phoenix
#

javadocs are quite trash as their own thing

lyric mountain
#

You do know javadocs are the thing that appear when you do ctrl + Q, right?

#

Reading javadocs directly on the site is a hell

earnest phoenix
#

that's what i was referring to

#

on site

lyric mountain
#

When you peek into the javadocs, javadocs peek into you

clear wraith
#

I just created a c!play music command, and I can't figure out why its not working.

#

There is an error in the logs when i use it.

#

so ill go grab that along with its code.

#

error:
(node:12178) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined

lyric mountain
#

It's not returning the expected value

#

So the promise is failing

clear wraith
#

code:
const serverQueue = message.client.queue.get(message.guild.id);

lyric mountain
#

That's.....wrong I think

clear wraith
#

I did it wrong??

lyric mountain
#

You see, queue is a promise

#

So you gotta handle it

clear wraith
#

so i need to create a handler?

lyric mountain
#

Do you know how to use promises?

clear wraith
#

no, Im trying to learn though

lyric mountain
clear wraith
#

Awesome

earnest phoenix
#

Need help setting up my play command on command handler

lyric mountain
#

How much do you have currently?

earnest phoenix
#

how much what?

lyric mountain
#

How much code

#

Like, have you started making the play command?

earnest phoenix
#

might have to restart but I have 64 lines

#

I use ytdl, is there possibly a better way?

lyric mountain
#

Ytdl?

earnest phoenix
#

ytdl-core

#

youtube download core

lyric mountain
#

Ah, that

#

You'll need to use opus, lavalink or alike

earnest phoenix
#

I have opus

lyric mountain
#

Ytdl only downloads the file

earnest phoenix
#

and I was considering switching to lavalink

lyric mountain
#

Lavalink is good if you know what you're doing

earnest phoenix
#

as in javascript know what im doing?

lyric mountain
#

Well let's say that lavalink can either be the worst lib or the best lib depending on configuration

earnest phoenix
#

ah

#

im switching to lavalink because I think ytdl is no long compatable

#

it's too clunky and laggy

lyric mountain
#

But anyway, I did those questions to get more info about your issue, unfortunately I know little about sending audio with js

#

See if someone here knows something about it and link them here

earnest phoenix
#

I'm switching to lavalink anyway

lyric mountain
#

Instead of saying all that again

copper fog
#

Is there any HTML example on showing the statistic for my bot?

lyric mountain
#

@copper fog html no, you'll need some kind of backend

copper fog
#

Markdown?

lyric mountain
#

No, those are static

#

You need something like php, node, react, whatever

copper fog
#

Oh ._.

glass sandal
earnest phoenix
#

need help with custom prefix command setup

sudden geyser
#

explain

earnest phoenix
#

I followed a guide to have keyv store custom prefixes for each server, I use the code they used in the guide but my .prefix command does nothing

#

no sign of reply and it doesn't crash

copper cradle
#

show

#

your

#

code

earnest phoenix
#
                if (message.author.bot) return;

               

                    let args;
                    if (message.guild) {
                        let prefix;

                        if (message.content.startsWith(globalPrefix)) {
                            prefix = globalPrefix;
                        } else {
                            // check the guild-level prefix
                            const guildPrefix = await prefixes.get(message.guild.id);
                            if (message.content.startsWith(guildPrefix)) prefix = guildPrefix;
                        }

                        // if we found a prefix, setup args; otherwise, this isn't a command
                        if (!prefix) return;
                        args = message.content.slice(prefix.length).split(/\s+/);
                    } else {
                        const slice = message.content.startsWith(globalPrefix) ? globalPrefix.length : 0;
                        args = message.content.slice(slice).split(/\s+/);
                    }

                    // get the first space-delimited argument after the prefix as the command
                    const command = args.shift().toLowerCase();
                    if (command === 'prefix') {
                        if (args.length) {
                            await prefixes.set(message.guild.id, args[0]);
                            return message.channel.send(`Successfully set prefix to \`${args[0]}\``);
                        }
                }
            })
        }
    }```
copper cradle
#

omg

#

why are you checking for everything the way you're doing it

#

and why are you defining prefix only if the message was sent in a guild

earnest phoenix
#

that's not my entire file

copper cradle
#

bruh

#

but still

sudden geyser
#

what is prefixes

earnest phoenix
#
    name: 'prefix',
    description: 'changes server-wide prefix',
    execute(bot, message, args) {

        const Discord = require('discord.js')
        const Keyv = require('keyv');
        const keyv = new Keyv('me like mangoes me live in sa')

            .on('message', async message => {
                if (message.author.bot) return;

               

                    let args;
                    if (message.guild) {
                        let prefix;

                        if (message.content.startsWith(globalPrefix)) {
                            prefix = globalPrefix;
                        } else {
                            // check the guild-level prefix
                            const guildPrefix = await prefixes.get(message.guild.id);
                            if (message.content.startsWith(guildPrefix)) prefix = guildPrefix;
                        }

                        // if we found a prefix, setup args; otherwise, this isn't a command
                        if (!prefix) return;
                        args = message.content.slice(prefix.length).split(/\s+/);
                    } else {
                        const slice = message.content.startsWith(globalPrefix) ? globalPrefix.length : 0;
                        args = message.content.slice(slice).split(/\s+/);
                    }

                    // get the first space-delimited argument after the prefix as the command
                    const command = args.shift().toLowerCase();
                    if (command === 'prefix') {
                        if (args.length) {
                            await prefixes.set(message.guild.id, args[0]);
                            return message.channel.send(`Successfully set prefix to \`${args[0]}\``);
                        }
                }
            })
        }
    }```
copper cradle
#

that's the error

lyric mountain
#

That small block of code is like a titanic on top of a glass

copper cradle
#

you don't know what you're doing

sudden geyser
#

that syntax is not correct

earnest phoenix
#

oh bot.on is there

sudden geyser
#

and you should not try creating a new message listener inside a command run

copper cradle
#

@earnest phoenix that shouldn't be there

#

ok cry will handle this

earnest phoenix
#

stop copy pasting code and read the text above the shiny colorful code blocks that explains what you're supposed to do

copper cradle
#

brb

earnest phoenix
#

ah

#

oh

#

so I wasn't supposed to use the guide's command handler unless I really neeeeeeeeeded to...

copper cradle
#

dude

#

read that

#

you won't be able to fully transfer the DOM to node.js but you'll be able to transfer logic and good practices

earnest phoenix
#

will give it a read

robust moth
#

What is right ? V =12.x.x

Or
message.channel.messages.fetch({})```
tired cloud
#

according to the docs

#

the 2nd

zealous urchin
#

I would like for my bot to update message every 1.5 seconds. Is it considered as API abuse?

cedar nova
#

why is my bot always quota exceeded, what if later my bot is on 250 more servers?

#

anyone can help me?

#

what if lots of people are tuning in to music and it's always like this?

clear wraith
#

I have an error with my c!bancommand,
Error: (node:31860) UnhandledPromiseRejectionWarning: TypeError: promptMessage is not a function


Code: line 77

const emoji = await promptMessage(msg, message.author, 30, ["โœ…", "โŒ"]);

drowsy sentinel
#

Well let's see the source for "promptMessage".

#

@clear wraith

cedar nova
#

help me

turbid bough
#

It's like how you would ask discord to verify you to get over 100 servers

clear wraith
#

idk

#

if its supposed to be discord.js for the require part

drowsy sentinel
#

Well, I guess I don't need to see the function because you are importing it incorrectly.

clear wraith
#

?

drowsy sentinel
#

You are trying to import a function called 'promptMessage' from the discord.js library which doesn't exist.

#

You need to import it from the file it exists in, example: ../tools/functions

#

tools would be the folder, and functions the .js class file that contained the promptMessage function.

clear wraith
#

Ok, I will go create one for this, and ill see how it goes

drowsy sentinel
#

You don't need to create anything @clear wraith. Where is promptMessage?

#

Did you even create a function called promptMessage or did you just assume discord.js had it?

clear wraith
#

I didn't create one ๐Ÿคฆ

drowsy sentinel
#

discord.js doesn't have promptMessage, so you have to make that function yourself.

solar summit
#

Lol since when was promptMessagr a thing, whereโ€™d u find if cuz if it was on the docs theyโ€™ll have to remove it

clear wraith
#

ok

robust moth
#

How to defined 14 day older message in a channel

earnest phoenix
#

Umm

clear wraith
#

@drowsy sentinel I changed discord.js to ../../functions.js

const { stripIndents } = require("common-tags");
const { promptMessage } = require("../../functions.js");
drowsy sentinel
#

You'd need the promptMessage function in the functions.js file and it would have to be exported.

#

Are you familiar with programming?

clear wraith
#

Im not that great at it, but im learning.

#

I have

drowsy sentinel
#

I'd recommend looking either further into the discord.js library https://discord.js.org/ or learning JavaScript on Codecademy.

clear wraith
#

I have promtMessage in the functions file... I just found it

drowsy sentinel
#

Okay, did you try and see?

clear wraith
#

try the command?

drowsy sentinel
#

Run it and see what errors you get.

clear wraith
#

I havn't tried the command, because my bot is offline because of the error

drowsy sentinel
#

Well if you did it right it should work.

clear wraith
#

It says it can't find the module

copper cradle
#

show your file tree

clear wraith
#

even though its there

copper cradle
#

are you sure the file is in ../../ and not in ../ or ./

clear wraith
#

those are my main files

copper cradle
#

in which file are you calling the prompt message function?

clear wraith
#

functions.js

drowsy sentinel
#

./functions.js

copper cradle
#

no

#

I mean

#

where are you calling the function

#

not defining

#

in which file are you doing const { promptMessage } = require('')

clear wraith
#

In my ban file

copper cradle
#

and where is that ban file locatedm

#

can you show the entire file tree?

clear wraith
#

I will try, I have quite a lot of commands

#

give me a sec

earnest phoenix
#

Can i use css on my top.gg page ?

copper cradle
#

wait

#

remove one ../ from the require function

#

do you know what ./ and ../ mean?

earnest phoenix
#

Can i use css on my top.gg page ?

copper cradle
#

yss

#

yes*

copper cradle
#

wait there's a command named 'me gusta' do you speak spanish?

clear wraith
#

yes

copper cradle
#

your fix will be removing one ../ from the require function

#

do you know what ../ and ./ mean?

clear wraith
#

No

copper cradle
#

then why did you try ../../

clear wraith
#

are they like folders

copper cradle
#

./ means the same folder as the file the ./ is in

#

../ means the parent folder

#

so basically doing ./ is the same as doing cd .

#

and doing ../ is cd ..

clear wraith
#

I removed the ../../, and now it says it can't fin the module:

copper cradle
#

I said remove ONE ../

#

not both ../

#

so the thing should look like this

#

../functions.js

clear wraith
#

Ok.

#

Now I have no errors

copper cradle
#

then congrats

#

it's fixed

#

now go back to testing

clear wraith
#

Thank you! I appreciate it!

copper cradle
#

np

clear wraith
#

How would I delete this message, after it has been used?

slender thistle
#

message2 = sendMessage(etc)
message2.delete()

clear wraith
#

Do i put that at the end of the code?

slender thistle
#

inside the message event after you are done doing everything, sooo.... yeah catshrug

clear wraith
#

Ok

wet barn
#

.then(m => m.delete())

earnest phoenix
#

?

#

find the element class with inspect element

#

and overwrite it in your desc

#

ok

visual turtle
#

Is there a specific channel or server to talk about JDA?

mossy vine
visual turtle
#

Thanks

mossy vine
#

the discord-api server also has a jda channel iirc

earnest phoenix
#

and for js ?

visual turtle
#

iirc?

mossy vine
#

if i remember/recall correctly

visual turtle
#

Ah ok

glad charm
#

@sick cloud ts folder.roles.splice(folder.roles.indexOf(r), 1); example of stuff I do.

sick cloud
#

m'kay

glad charm
#
 const index = this.reactMessage.indexOf(M_ID);
        if (index > -1) {
          this.reactMessage.splice(index, 1);
        }```
sick cloud
#

i'm just gonna check some stuff to be sure i didn't break something

glad charm
#

Also probably wanna check index.

#

Yeah

sick cloud
#

ok indexOf is 0

#

so it's doing splice(0, 1)

#

hm

glad charm
#

OH

sick cloud
#

should work

#

there's only the one array element

#

categories.splice(categories.indexOf(category[0]), 1);

pale stone
#

How do I make embeds? in JS?

sick cloud
#

what library @pale stone

glad charm
#

Depends on the lib.

pale stone
#

Sorry I'm very new to coding bots and coding at all (well i know how to make const, let, var, if, funcations ect)

#

What is library(lib)

sick cloud
#

learn js before making a bot

#

if you don't know what library you're even using you need to learn js before trying to make a bot

turbid bough
#

idk you dont really need to learn js first.

#

any language is fine

nocturne grove
#

The only thing I want is the current PST time to know when the votes on top.gg will get reset. How can that be so hard? It's simple to set the time to LA time, but LA also has PDT

#

I tried getting the current UTC date and substracting 8h from that, but that's not working

#

oh wait I can also just substract 9h from my local time

#

no ^ is not true

#

solved it: js const now = moment().utc().subtract(8, 'hours');

golden condor
#

In discord.js is this the code for going on mobile?7

#
const client = new Discord.Client({
  fetchAllMembers: false,
  disableMentions: "everyone",
  messageCacheMaxSize: 0,
  presence: { status: "dnd" },
  ws: {
    intents: ["GUILDS", "GUILD_MEMBERS", "GUILD_BANS", "GUILD_VOICE_STATES", "GUILD_PRESENCES", "GUILD_MESSAGES", "DIRECT_MESSAGES"],
    "$browser": "Discord iOS" //this bit
  }
});```
cinder patio
#

object["Blam Canyon"]

#

object is the object where "Blam Canyon" is located, in your case body.invasions

clear haven
golden condor
#

On d.js, how do you make your bot look like it's on mobile

modern sable
#

@clear haven try editing your bot's page

clear haven
#

@modern sable ,in this case I can't find a place to put an image

modern sable
#

just edit

#

click on the edit button and click submit without changing anything

#

It forces DBL to refresh your bot's information

clear haven
#

ok thanks

cinder patio
#

It should be body.invasions["Blam Canyon"] and not .object.. I just typed object instead of body.invasions cause this be used to access property in any object

const obj = {
 "Something One": 1
}

console.log(obj["Something One"]);
#

and not to spoonfeed ;-;

heavy marsh
#

In discord.js v 12.2.0
To log shard disconnect is it correct?

bot.on("shardDisconnect", (event, id) => {

let embed = new discord.MessageEmbed();
embed.setColor(`#e74c3c`);
embed.setDescription(`Shard \`${id}\` Disconnected`);

botshards.send(embed);
console.log(`Shard ${id} Disconnected!`);
});
cobalt mesa
#

why event guildCreate and GuildDelete are call in this server while the bot is not gone no income
please mention me if you are an answer

earnest phoenix
#

how are the number of bots and real members from a server called? (discord.js v 11.5.1 ) i know that for all members is message.guild.memberCount

heavy marsh
#

^ You will have to filter it out to get the human member count and the bot count

earnest phoenix
#

How ?

heavy marsh
#
message.guild.members.filter( ... )```
surreal sage
#

shal i use json databases?

modest maple
#

no

pearl folio
#

Hello How Can I See My Boat's Ping On Your Voice Channel Discord.js Will Change Automatically

quartz kindle
#

what

heavy marsh
#

Tim is back

#

Hello

twin garden
#

I donโ€™t understand either

heavy marsh
mossy vine
heavy marsh
#

??

#

I am asking because I did try it

quartz kindle
heavy marsh
#

And I dont see it happing

quartz kindle
#

if you get a shardDisconnect, that shard is dead, it cannot send messages

heavy marsh
#

OOh so no way to do that

quartz kindle
#

shardDisconnect should never happen, only if you have some real bad error

heavy marsh
#

as I use weebhooks

#

But I get shard resume

quartz kindle
#

use shardReconnect and shardResume

heavy marsh
#
//Shard Resumed
bot.on("shardResume", (id) => {
    
let embed = new discord.MessageEmbed();
embed.setColor(`#2ecc71`);
embed.setDescription(`Shard \`${id}\` resumed session!`);

botshards.send(embed);
console.log(`Shard ${id} resumed session!`);
});
#

But I get undefined

#
[30/04/20 10:06:37] [LOG] Shard undefined Reconnecting!
[30/04/20 10:06:37] [LOG] Shard 0 resumed session!
quartz kindle
#

show your shardReconnect

heavy marsh
#
//Shard Reconnections
bot.on("shardReconnecting", (unavailableGuilds, id) => {

let embed = new discord.MessageEmbed();
embed.setColor(`#FFFF33`);
embed.setDescription(`Shard \`${id}\` Reconnecting`);

botshards.send(embed);
console.log(`Shard ${id} Reconnecting!`);
});
quartz kindle
#

there is no unavailableguilds

#

only id

heavy marsh
#

oogs yes

cobalt mesa
#

why event guildCreate and GuildDelete are called in this server while the bot is not gone no income
please mention me if you are an answer

heavy marsh
quartz kindle
#

is that your bot?

heavy marsh
#

Nope

#

I have shard logs in bot.js

quartz kindle
#

then they are probably using shardReconnecting but writing "Disconnected" in the embed

heavy marsh
#

ooh

#

But if I put it in index.js will disconnet still not work?

quartz kindle
#

shardDisconnect and shardReconnecting are the same thing, but one will not reconnect, the other will

heavy marsh
#

ooh i see

#

So only these will work?

nocturne grove
#

why event guildCreate and GuildDelete are called in this server while the bot is not gone no income
please mention me if you are an answer
@cobalt mesa do you mean guildDelete emits and 2 sec later guildCreate, when the bot didn't leave at all? (mention me too)

heavy marsh
#

@quartz kindle Sorry for the ping

id.guilds.cache.size

Will this be correct to get the number of guilds on that shard?

#

on shard ready

quartz kindle
#

no

heavy marsh
#

So just bot.guilds.cache.size

quartz kindle
#

if you're using the sharding manager, yes

heavy marsh
#

OOh ok let me test it

quartz kindle
#

0003 is unicode for END OF TEXT

#

not sure why would a json api ever return that in the middle of the text lol, but you can probably use a replace function

heavy marsh
#

How can i fix the latency

#
${bot.ws.shards.get(id).ping}
quartz kindle
#

there is no latency yet on shard ready

#

i think

#

but try bot.ws.ping

heavy marsh
#

Same

earnest phoenix
#

how can i make a function in a different file to get the username of the message.author
(where message is not defined)

nocturne grove
#

@earnest phoenix how can you get an author of a message that doesn't exist?

cobalt mesa
#

@nocturne grove basically yeah

earnest phoenix
#

i mean
i have no idea

#

i try to use a function

#

but from another file

nocturne grove
#

ah yes I had that too. I fixed it by these two lines

if (Date.now() - guild.joinedTimestamp > 10000) return console.log('Stopped a fake guildCreate event');
if (client.guilds.cache.get(guild.id)) return console.log('Stopped a fake guildDelete event');

Though I've not seen any of these logs yet @cobalt mesa

#

both of these just under both of the events

quartz kindle
#

either send the message as a function parameter or send the author itself as a parameter

#

@earnest phoenix

nocturne grove
#

^

earnest phoenix
#

oh
like async?

#

in the parameters?

nocturne grove
#

yes, where you can also place async

heavy marsh
earnest phoenix
#
getusername: function(message) {
    return message.author.username```
cobalt mesa
#

ah yes I had that too. I fixed it by these two lines

if (Date.now() - guild.joinedTimestamp > 10000) return console.log('Stopped a fake guildCreate event');
if (client.guilds.cache.get(guild.id)) return console.log('Stopped a fake guildDelete event');

Though I've not seen any of these logs yet @cobalt mesa
@nocturne grove oh ok thanks
Just a last question, first condition is for guildCreate event and the second for guildRemove event ??

earnest phoenix
#

this is my function but it still didnt work

#

@nocturne grove

#

the error is that it cant get author of undefined

quartz kindle
#

what are you passing to the function?

#

like how do you use getusername()

earnest phoenix
#

how do i get the function?

#

is that your question?

nocturne grove
#

@cobalt mesa np
Yes, but guildRemove = guildDelete ofcourse

quartz kindle
#

@heavy marsh in the shards, check if the channel you want to send to exists first

nocturne grove
#

guildRemove is not a thing

quartz kindle
#

@earnest phoenix how do you use it

cobalt mesa
#

@cobalt mesa np
Yes, but guildRemove = guildDelete ofcourse
@nocturne grove yes guildDelete sorry ๐Ÿ˜‚

nocturne grove
#

@earnest phoenix you should also give the message object to the function when you execute it

earnest phoenix
#
  if(command === "checking") {
    let functions = require("./functions.js")
    let username = functions.getusername()
    message.channel.send(username)
  }```
#
const functions =  
{
  abc: function() {
    return 10
  },
  getusername: function(message) {
    return message.author.username
  }
}
module.exports = functions;
quartz kindle
#

you have to use is as getusername(message)

earnest phoenix
#

(new to other files, just wanted to make it look clear)

quartz kindle
earnest phoenix
#

oh

heavy marsh
#

@quartz kindle I am using webhooks

quartz kindle
#

what you put inside () is what you get inside function()

earnest phoenix
#

oh
so i need to use the parameter in both command and function?

heavy marsh
#

So i dont think it will matter right?

nocturne grove
#

but why should you use functions for one short line like that?

quartz kindle
#

yes, the command sends the parameter, the function receives the parameter and does something with it

nocturne grove
#

but why should you use functions for one short line like that?
or am I just noob

quartz kindle
#

@heavy marsh if you're sending a webhook, you might be able to do it from the shard manager

heavy marsh
#

So in index.js?

quartz kindle
#

wherever you use the shardingManager

heavy marsh
#
const config = require('./settiings/credentials.json');

const { ShardingManager } = require('discord.js');
const manager = new ShardingManager('./bot.js', { token: config.token });

manager.spawn();
manager.on('shardCreate', shard => console.log(`[ Shard Log ] Launched shard ${shard.id}`));
earnest phoenix
#

but why should you use functions for one short line like that?
@nocturne grove just for checking how it works

#

if you asked me

nocturne grove
#

ohh okay

#

yeah I asked to you / in general

quartz kindle
#

settiings lmao

heavy marsh
#

lol

#

Can I still get the full shard count?

earnest phoenix
#
    at item.request.gen.end (/rbd/pnpm-volume/5b146d33-2649-47dc-b5df-4bb5db586bdc/node_modules/.registry.npmjs.org/discord.js/11.6.4/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:85:15)
    at then (/rbd/pnpm-volume/5b146d33-2649-47dc-b5df-4bb5db586bdc/node_modules/.registry.npmjs.org/snekfetch/3.6.4/node_modules/snekfetch/src/index.js:215:21)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:3758) 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(). (rejection id: 127)```
#

help me

#

pls

#

:((

heavy marsh
#

Your bot is missing permission

#

On some command

#

The error is that

quartz kindle
#

@heavy marsh shardingManager.totalShards

earnest phoenix
#

Your bot is missing permission
@heavy marsh yes

#

check if the bot has perms @earnest phoenix

#

(to do whatever command)

#

and

#

(node:3758) 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(). (rejection id: 127)

#

?

quartz kindle
#

that means you didnt catch the error above

earnest phoenix
#

@quartz kindle how ?

quartz kindle
#

.catch()

heavy marsh
#

It will be - js manager.on(`ready`, )

#

Right?

quartz kindle
#

manager doesnt have a ready event

heavy marsh
#

So only shardcreate

earnest phoenix
#

It will be - js manager.on(`ready`, )
@heavy marsh how ?

heavy marsh
#

That is for my question

#

not for you lol

earnest phoenix
#

haa okey ๐Ÿ˜„

#

(node:3758) 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(). (rejection id: 127)
help

#

pls

heavy marsh
#

Its unclear

#

You have to give us more info

earnest phoenix
#
    at item.request.gen.end (/rbd/pnpm-volume/5b146d33-2649-47dc-b5df-4bb5db586bdc/node_modules/.registry.npmjs.org/discord.js/11.6.4/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:85:15)
    at then (/rbd/pnpm-volume/5b146d33-2649-47dc-b5df-4bb5db586bdc/node_modules/.registry.npmjs.org/snekfetch/3.6.4/node_modules/snekfetch/src/index.js:215:21)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:3758) 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(). (rejection id: 127)```

@heavy marsh more info

quartz kindle
#

@earnest phoenix ```js
message.channel.send("bla") // if it has permissions, it will work
message.channel.send("bla") // if no permission, it will error with Unhandled Promise Rejection
message.channel.send("bla").catch(error => console.log(error)) // if no permission, it will console.log the error instead of rejecting

heavy marsh
#

(node:3758) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions
#

Perfect example ^

earnest phoenix
#

@earnest phoenix ```js
message.channel.send("bla") // if it has permissions, it will work
message.channel.send("bla") // if no permission, it will error with Unhandled Promise Rejection
message.channel.send("bla").catch(error => console.log(error)) // if no permission, it will console.log the error instead of rejecting

@quartz kindle but where should i write?

quartz kindle
#

thats not for you to copy and paste

#

thats for you to read the comments i wrote

#

and understand why its showing that error in your code

earnest phoenix
#

sever.js ?

quartz kindle
#

...

earnest phoenix
#

Should I write maine?

quartz kindle
#

please read

earnest phoenix
#

main = sever.js

#

I mean

flat pelican
#

Please don't ask to be spoonfeeded

#

Tim is helping you and trying to explain where is the problem, not giving you the solution directly

earnest phoenix
#

I do not understand anything

#

i'm sorry ๐Ÿ˜ฆ

heavy marsh
#

Which version are you using?

earnest phoenix
#

@heavy marsh discord.js 11.5.1

quartz kindle
#

did you code it yourself or did someone code for you?

earnest phoenix
#

I coded half myself

#

:((

heavy marsh
#

So its like this ...
(node:3758) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions
^ This means your missing permission. So when your testing the command the bot is missing some permissions.

#

Or check your bot permission

earnest phoenix
#

So its like this ...
(node:3758) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions
^ This means your missing permission. So when your testing the command the bot is missing some permissions.
@heavy marsh okey and I understand

heavy marsh
#

Like send message

earnest phoenix
#

guys how can i track votes , like if one vote for my bot , my bot send (**[UserID] Voted Now ! **) ?

heavy marsh
#

Check this for missions

quartz kindle
#

@earnest phoenix use the top.gg api

heavy marsh
#

permissions*

quartz kindle
earnest phoenix
#

@earnest phoenix use the top.gg api
@quartz kindle oky thank you Z7

quartz kindle
sullen patrol
#

Is there a discord.js event that gets called when mentioned?

#

I can't find it in the documentation

pale vessel
#

you can check if the message had mentions in it

sullen patrol
#

ok

heavy marsh
#

@quartz kindle Then how to get the guild from shardmanger

#

the total guilds

quartz kindle
heavy marsh
#

OOh I see thank you

sullen patrol
#

does somebody have code to check if my bot is mentioned?

quartz kindle
#

check if the message contains mentions

sullen patrol
#

I tried

pale vessel
heavy marsh
#

Error: ```js
(node:12) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'on' of null

**Code:** ```js
//When Bot Is Conneted
manager.on('shardCreate', (shard) => {
manager.fetchClientValues('guilds.cache.size').then(results => {
const totalGuilds = results.reduce((prev, val) => prev + val, 0)

fs.readdir("./commands/", (err, files) => {
if (err) console.error(err);
let jsfiles = files.filter(f => f.split(".").pop() === "js");
        
let embed = new discord.MessageEmbed();
embed.setThumbnail(bot.user.avatarURL());
embed.setTitle(`Bot Fully Booted`);
embed.setColor(`#2ecc71`);
embed.addField("Guilds", totalGuilds, true);
embed.addField("Shards", shard.totalShards, true);
embed.addField("Commands", jsfiles.length, true);

botshards.send(embed);
});
});
console.log(`[ Bot Fully Booted ] Bot Booting to ${shard.totalShards} shards`);
});``` - @quartz kindle
#
[ Bot Fully Booted ] Bot Booting to undefined shards```
#

Or is it completely wrong

pale vessel
#

read docs

quartz kindle
#

manager.totalShards

heavy marsh
#

shard.manager.totalShards

quartz kindle
#

also, you should only run that code when the last shard has been created

#

no, just manager

heavy marsh
#

Then it told me manager not defined

quartz kindle
#

it cant be undefined, you're using it a few lines above

#

anyway the manager doesnt tell you when all shards are ready

#

you have to do something like this (untested) ```js
manager.on("shardCreate", shard => {
shard.on("ready", () => {
if(shard.id === manager.totalShards - 1) {
// run your code here
}
})
})

heavy marsh
#

What can I do to run this even after all the shards are online?

surreal notch
#

I am on discord.js v12

#
const ms = require('parse-ms')
const Discord = require('discord.js')


module.exports = {
    name: "daily",
    category: "info",
  usage: "daily",
    description: "Get daily credits ",
    run: async (client, message, args) => {    
            if(!message.content.startsWith('!'))return;  
          
            let user = message.author;
          
            let timeout = 86400000;
            let amount = Math.floor(Math.random() * 400) + 1;
          
            let daily = await db.fetch(`daily_${message.guild.id}_${user.id}`);
          
            if (daily !== null && timeout - (Date.now() - daily) > 0) {
              let time = ms(timeout - (Date.now() - daily));
            
              let embed = new Discord.MessageEmbed()
              .setColor("#FFFFFF")
              .setDescription(`โŒ Hey${time.hours}h ${time.minutes}m ${time.seconds}s `);
              message.channel.send(embed)
            } else {
              let embed = new Discord.MessageEmbed()
              .setThumbnail(message.author.displayAvatarURL)
            .setTitle("**Daily Money**")
            .setColor("#FFFFFF")
            .setDescription(`:PandaRiche: hmm ${amount} coins`);
            message.channel.send(embed)
            db.add(`money_${message.guild.id}_${user.id}`, amount)
            db.set(`daily_${message.guild.id}_${user.id}`, Date.now())
          
          
            }
}}
#

Please tell me why it is not working

pale vessel
#

iT's NoT wOrKinG

#

what's not working?

heavy marsh
pale vessel
#

read @earnest phoenix

surreal notch
#

@pale vesselcmd is not working

#

I have checked codes

#

And no error

quartz kindle
#

have you tried debugging?

surreal notch
#

@quartz kindlei think there must a problem in changing from v11 to v12

#

But I cant find it

quartz kindle
#

displayAvatarURL is a function in v12

hallow sandal
pale vessel
#

open logs

hallow sandal
#

Where's logs?

#

Build log?

pale vessel
hallow sandal
#

@pale vessel

pale vessel
#

@hallow sandal

hallow sandal
#

Oh

#

@pale vessel

pale vessel
#

read the error because it's your code

#

@hallow sandal

#

invalid syntax

#

also stop pinging me

unreal steeple
#

Is here anyone who uses discord.py? I need to make -vote command & I dont know how

earnest phoenix
#

how do you make like a table so like "632327424595722251", "632327424595722251"

modest maple
#

@unreal steeple just send a message saying vote for me or somthing

#

pretty much as simple as it get

unreal steeple
#

no i mean on its usage, it will vote for him

#

can i do it?

modest maple
#

no

#

the user has todo that and sign in on the site

#

you cant automate it

unreal steeple
#

oh ok

wheat saffron
#

@unreal steeple I use discord.py, how may I help you

unreal steeple
#

i got an answer

#

no way

wheat saffron
#

nice

unreal steeple
#

or gimmie ideas for commands :)

next wagon
#

How do we add a bot to the website...

pale vessel
unreal steeple
#

@earnest phoenix what will the command do?

wheat saffron
#

@unreal steeple Make a modmail command?

#

when the user runs a cmd

unreal steeple
#

what will it do

wheat saffron
#

it opens a new channel

unreal steeple
#

what

#

my bot is hosted

wheat saffron
#

member will DIRECTLY communicate to staff to discuss their problems

#

bruh what

#

I have a modmail bo

#

bot*

unreal steeple
#

on heroku

wheat saffron
#

It's pretty easy to do so in dpy

unreal steeple
#

cool

wheat saffron
#

ok great ๐Ÿ‘

unreal steeple
#

oh i understood

#

but bot cant understand commands in dm's

#

i mean i have prefix changing system

wheat saffron
#

Not DM's

#

like they run a COMMAND.

#

bruh i can do that with json

unreal steeple
#

oof ok

wheat saffron
#

so easy

#

If you won't do modmail

unreal steeple
#

i mean i need fun commands

wheat saffron
#

Try this challenge: Make a Economy Bot

#

i made one

#

8ball?

#

Diceroll

#

Coinflip

unreal steeple
#

yes

wheat saffron
#

etc

unreal steeple
#

reverse, dice

#

yes

wheat saffron
#

they'll make use of random.choice

unreal steeple
#

even joke

modest maple
#

How bout making a bot thats actually unique rather than like thousands of other bots bloblul

wheat saffron
#

yep

#

even QUIZ

#

bot.wait_for

unreal steeple
#

๐Ÿ‘

#

no i have no quiz

quartz kindle
#

make a bot that shows the positions of the stars in the sky

unreal steeple
#

how to do that

wheat saffron
#

bruh

unreal steeple
#

hah

wheat saffron
#

2 hard

modest maple
#

lol tim

quartz kindle
#

make a bot that shows information about latest earthquakes

wheat saffron
#

But as a stargazer i'd love them

slender thistle
#

Thanks for the idea Tim

quartz kindle
#

@slender thistle fuck

modest maple
#

have you ever thought that maybe the reason why some bots get big and others dont is by how much effort the developer puts in and how well they make it

wheat saffron
#

@slender thistle u tryna make that bot???

#

it's hard

modest maple
wheat saffron
#

webscraping is really hard

#

and you can fuck things up quickly

modest maple
#

no its fucking not

slender thistle
#

It's only an idea as of currently

modest maple
#

it takes 5 minutes to make a system for scraping a site

quartz kindle
#

im actually pondering about the idea myself

wheat saffron
#

If it doesn't have complex encoded stuff

unreal steeple
#

make a bot that shows the positions of the stars in the sky
@quartz kindle

@bot.command()
async def starpos(ctx, star:str):
    if star=="that one":
        await ctx.send("Its a star you dumb kid")```
wheat saffron
#

@quartz kindle i can help as a stargazer ๐Ÿ˜‰

slender thistle
#

indents, colons, ==

unreal steeple
#

remember command

quartz kindle
#

my bot actually does that @wheat saffron @unreal steeple but it puts them in an astrology chart

modest maple
wheat saffron
#

hmm Thonk

#

ยฏ_(ใƒ„)_/ยฏ

unreal steeple
#

wtf

#

plz normal ideas :)

quartz kindle
#

so it would be the stars positions from a geocentric perspective

#

placed along the ecliptic

unreal steeple
#

๐Ÿคฆ

modest maple
#

@unreal steeple make something unique

unreal steeple
#

like a bot

#

done

modest maple
#

if you want your bot to grow start by not making a bot like every other multi purpose bot

wheat saffron
#

make a discord bot WITH FLASK
now that's a fucking hard challenge

modest maple
#

no its not

#

my bot runs on Django

unreal steeple
#

if you want your bot to grow start by not making a bot like every other multi purpose bot
@modest maple
motive quotes

modest maple
#

its the truth 002_shrug

wheat saffron
#

yeah

#

there are no fucking ideas left

#

what can he do

modest maple
#

do somthing you'll actually end up using not somthing thats easy

unreal steeple
#

top 10 motive quotes:
10. east or west, home is home

#

example

#

I have a coin system, and im wondering about "-travel" command, if i use it, i can find coins, or kill enemies...

wheat saffron
#

u can make a bot which turns off or on your wifi
or tells you which clients are connected to your wifi
now that's a genius idea

#

I have one bot BTW xdddd

unreal steeple
#

what about tic tac toe command? how can i realise it?

#

or turn off pc

#

or get your's ip adress

#

cool

wheat saffron
unreal steeple
#

thanks

#

cool

#

thats what i needed

modest maple
wheat saffron
#

bruh

unreal steeple
#

:kukuha:

wheat saffron
#

good thing i censored out the mac address

#

hehehehe

unreal steeple
#

i have command that can send animated emojis

#

is it unique

stark terrace
#

anyone here ever had issues with commands not responding 95% of the time when scaling your bot on several shards?

modest maple
#

what is your end goal for your bot?

#

anyone here ever had issues with commands not responding 95% of the time when scaling your bot on several shards?
@stark terrace

No never had that

stark terrace
#

yeah this is a pretty recent issue for me

#

11 shards with nearly 11k guilds

#

and commands are generally just not responding

modest maple
#

64 Shards weirdsip

stark terrace
#

i'm not sure if it's a sharding issue or not tbh

modest maple
#

what lib r u

#

eh js

stark terrace
#

discord.js

modest maple
#

i cant see how sharding is the issue

#

considering you will of had to previously shard

stark terrace
#

mhm

modest maple
#

unless u fucked somthing up on quite a amazing scale

stark terrace
#

yeah idk

maiden mauve
#

I have a new idea for a bot

wheat saffron
#

TELL MEEE

maiden mauve
#

It's going to do everything a moderator can do by right clicking a name

unreal steeple
#

i found tic tac toe example

maiden mauve
#

but with chat commands

wheat saffron
#

...

#

excuse me loaf

#

you can do that bruh

unreal steeple
#

best

wheat saffron
#

with right clicking

unreal steeple
#

๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘

#

applause

#

@wheat saffron

maiden mauve
#

I'm gonna call the bot, "Rightclickr"

wheat saffron
#

also that will be strictly attacking discord tos

#

bruh

#

don't

#

never

#

do

#

that

#

no one will invite ur bot

#

members will try the rightclick and bang done everyone's banned finished boom

#

server will die in seconds

slender thistle
#

Please don't send individual messages like that arghEyes

wheat saffron
#

lmfao

maiden mauve
#

so much moderation

slender thistle
#

It's just obnoxious and spammy

modest maple
#

๐Ÿ‘ Moderation๐Ÿ‘ Bots ๐Ÿ‘ are ๐Ÿ‘ not ๐Ÿ‘ new ๐Ÿ‘

maiden mauve
#

do you read those as a clap

wheat saffron
maiden mauve
#

๐Ÿ‘

#

that's my next big project for my bot

wheat saffron
maiden mauve
#

something that explains functions more in depth than discord can

modest maple
#

I should do a dash board butttttttt i cba

#

not that its hard to integrate with the bot

maiden mauve
#

I mean if your bots in js

#

you can literally copy and paste half your bot to the html

modest maple
stark terrace
#

ok so in my dev environment w/ a few shards spawn, commands respond okay. If I spawn up 11 shards like I have in production, no command response. It seems like it's a sharding issue @modest maple

hidden pendant
#

why is everything from nekos.life banned? shouldn't the sfw api be allowed?

modest maple
#

no

#

because it still can return dodgy content

hidden pendant
#

ok then

#

guess i'll have to wait for nekos.life to fix up

modest maple
#

yeah that wont happen lol

timid blade
#

my bot is showing that this server doesnt exist, even tho it is in it (i only have one shard) @ripe slate is the bot, its showing offline here. 10/10 discord

royal portal
#

I need help