#development

1 messages · Page 493 of 1

earnest phoenix
#

That’s the thing

lusty dew
#

is it

#

client.channels.get

#

or

#

clinet.channel.get

#

client.channel.get*

west raptor
#

client.channels.get

lusty dew
#

Ok

#

Just making sure lol

west raptor
#

alright

bright spear
#

you could have just checked it 🤔

earnest phoenix
west raptor
#

code?

earnest phoenix
#

It’s on eval

#

Copy and paste don’t work

#

For my phone

#

@west raptor

west raptor
#

hm

#

what did you try to eval xd

earnest phoenix
#

kh>eval let s = bot.guilds.find("id", "480359296715063296")
let p = s.channels.find("id", "483522909923704832")
p.send("test")

inner jewel
#

if the bot keeps crashing

#

instead of setting up auto restart/catching the error

earnest phoenix
#

It’s not crashing

inner jewel
#

you don't like

#

fix the error?

earnest phoenix
#

I tried

#

More then multiple times

inner jewel
#

you said it crashes here

earnest phoenix
#

It’s always never fixed

inner jewel
#

explain the line var randmsgNum = ...

earnest phoenix
#

Yeah it crashed everytime it changed the game

inner jewel
#

step by step

earnest phoenix
#

It’s basically going into a Json file and finding a random message and applying it

#

And m is the name of the text line

#

So like “m”: “over the world”

inner jewel
#

that's not what i said

earnest phoenix
#

{
“m”: “Oof”
},
{
“m”: “thing”
},

inner jewel
#

explain to me how it's generating the index

#

and you'll notice the error

earnest phoenix
#

I don’t know how math.random works

#

I had to get the other dev to do that

inner jewel
#

then you should learn js

earnest phoenix
#

Probably

inner jewel
#

it returns a pseudo random number between 0 and 1

#

you multiply that by messages.messagelist.length

#

so you get [0, messages.messagelist.length]

earnest phoenix
#

Okay

inner jewel
#

then you floor it

#

to get an integer

#

so it's same range but as an integer now because array indexes are integers

#

then you add one

#

which makes it [1, messages.messagelist.length + 1]

#

but js arrays are 0-based

earnest phoenix
inner jewel
#

so you won't ever read the first element

#

and might read more than the last

#

which will be undefined

#

so you get an error

earnest phoenix
#

That did and didn’t make sense

quartz kindle
#

basically, if your array has 35 items, they will be numbered from 0 to 34

#

and that code will give you a random number between 1 and 35

#

meaning 0 with never be chosen, and 35 will cause an error

knotty steeple
#
'conda' is not recognized as an internal or external command,
operable program or batch file.``` i already installed the thing to use this but it isnt working ![GWvictoriaNotLikeBlob](https://cdn.discordapp.com/emojis/384871121893195776.webp?size=128 "GWvictoriaNotLikeBlob")
quartz kindle
#

did you restart the command line?

knotty steeple
#

yes

quartz kindle
#

then its probably something with environment variables

#

sometimes you need to force them to refresh

#

or restart your pc

lusty dew
#
TypeError: Cannot read property 'client' of undefined
    at new MessageCollector (c:\Users\User\Desktop\No name\node_modules\discord.js\src\structures\MessageCollector.js:22:19)
    at client.loadUserData.data (c:\Users\User\Desktop\No name\commands\bal.js:9:35)
    at db.collection.findOne (c:\Users\User\Desktop\No name\library\database_functions.js:29:13)
    at result (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\utils.js:414:17)
    at session.endSession (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\utils.js:401:11)
    at ClientSession.endSession (c:\Users\User\Desktop\No name\node_modules\mongodb-core\lib\sessions.js:129:41)
    at executeCallback (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\utils.js:397:17)
    at handleCallback (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\utils.js:128:55)
    at cursor.next (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\operations\collection_ops.js:570:5)
    at result (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\utils.js:414:17)
#

I keep getting that error but I can't figure out how to fix it

lusty dew
#

How can you find a channel by it's name

#

isn't

#
let channel = message.channel.find(c => c.name => "channelname")
#

?

lusty dew
#

oof nvm

#

Figured it out

clever radish
#

Anyone know of a way to exclude a discord server from client.users.size (discord.js); trying to get a more accurate user count

boreal drum
#

message.channel.send(client.guilds.size - 1) @clever radish

bright spear
#

@boreal drum they said from client.users.size

#

@clever radish you could just subtract the amount of cached members in the server, however that will also remove people who are in multiple servers including that one

#

To be honest cached user count isn't really an important statistic

clever radish
#

Hmm, what would you recommend then for seeing the number of users from client.guilds? Trying to avoid just looping through all guilds and getting memberCount, but not sure if something else exists

topaz fjord
#

filter through each guild and get member count

#

then add them all together

#

that's pretty much to only way unless you want to cache each user

#

Which would kinda fuck your memory

clever radish
#

True, haha; guess I'll do the loop then

#

Was surprised the api didn't have something specific to do the count

topaz fjord
#

d.js doesn't cache all users for that reason

clever radish
#

Makes sense, thanks for the help

earnest phoenix
#

Hi.

earnest phoenix
#

Hi

native folio
#

Bye

lusty dew
#

lmfao

#

What the hell was this conversation

void mantle
#

no u

wooden shoal
#

Try reloading the site with ctrl+shift+r then register the bot again

#

@earnest phoenix

#

Okay. I just told you how to do it

earnest phoenix
#

roblox pfp haHAA :nigga haHAA on mobile cos parents kicked off pc haHAA

#

classic dbl

wooden shoal
#

Lol

#

Then just clear the cache in your browser for that site and reload it @earnest phoenix

#

(You can do this on mobile)

#

YOU'RE WELCOME

rustic axle
#

Lmao he got muted and left

wooden shoal
#

Lol

wide ruin
#

Is there a free, collaborate site to make a bot in py?

#

but on a site?

#

so basically https://glitch.com for python

rustic axle
#

Codecademy or CodeHS Sandbox?

#

It won't deploy from there ofc

#

But you can atleast code it

wide ruin
#

thanks

junior hornet
#

hi quick question how do i make my bot online because my bot was declined the fist time because it was offline when they look over it PLEASE HELP

wide ruin
#

just submit again

smoky spire
#

Get a host

wide ruin
#

or is it offline always

#

@junior hornet language?

junior hornet
#

node.js ?

wide ruin
#

dm me and ill help

smoky spire
#

I'm going to have to assume that it's the same thing as normal shards

wide ruin
#

?

quartz kindle
#

shards = multiple processes

#

a single process is limited to 2500 guilds, so a bot that is in 4000 guilds for example needs to have 2 shards, meaning 2 processes, each processing approximately 2000 guilds

feral swift
#

Can anybody help me make my bot?? Ociean

earnest phoenix
#

Ehm

#

You need to be specific as to what you need help with

feral swift
#

well basically the whole bot

#

i mean the whole bot

wide ruin
#

Thanks Tim

#

How can I (for example) make a typerace command

#

Discord.js

#

It checks for the next message to be x

#

But you have 30 s

inner jewel
#

a shard is just a connection to discord

wide ruin
#

Thanks

inner jewel
#

and discord forces all shards to have 2500 guilds or less

#

or they won't be able to start

wide ruin
#

Ok

hollow mauve
#

Yo can someone help me make a slowmode Command?

topaz fjord
#

Is slow mode even out

#

Yet

bright spear
#

@hollow mauve iirc it's not in any libs yet do you'll have to directly access the api

inner jewel
#

catnip has it :^)

knotty steeple
#

natan pls

#

thats the lib ur working on zoomeyes

prime cliff
#

@bright spear actually its in d.net lib

bright spear
#

@prime cliff iirc certified libs aren't allowed to include unreleased features

inner jewel
#

they are

bright spear
inner jewel
#

but they usually don't because until it's officially released the api might do breaking changes

#

so you'd waste effort

#

and it could even be removed

prime cliff
#

Works fine for me so mmLol

lusty dew
#

Can someone help me with something?

How I want it to look

Tue Sep 25 2018 10:00pm/am
#

Any ideas on how to get it too look like that

#

It is in an embed btw

earnest phoenix
#

ms

#

or some time converter

lusty dew
#

Ok

#

Ty

quartz kindle
lusty dew
#

?

#

Oh

#

Ty

upper ember
#
 const embed = new Discord.MessageEmbed()
        .setTitle(action)
        .setColor('#00FF00')
        .addField(userType, checkUser.username + "#" + checkUser.discriminator, true)
        .addField("Moderator", message.author.username + "#" + message.author.discriminator, true)
        .addField("Reason", reason)
        client.channels.get("493476991459393551").send(embed) 
#

how do I send the embed message id?

earnest phoenix
#

You need to resolve the message promise

#

and then send that message's ID

upper ember
#

how...? lol

earnest phoenix
#

It's a promise

#

so you can use .then() or async/await

loud bear
#

discord.py rewrite
member.add_role(guild.id, user.id, role.id, reason=reason) not working

Traceback (most recent call last):
  File "C:\Program Files\Python36\lib\site-packages\discord\client.py", line 224, in _run_event
    yield from coro(*args, **kwargs)
  File "C:\Users\raspberry\Documents\GitHub\CookieBot(test2)\run.py", line 256, in on_member_join
    await member.add_roles(guild, 'test', reason="Automatic Role assigment")
  File "C:\Program Files\Python36\lib\site-packages\discord\member.py", line 513, in add_roles
    yield from req(guild_id, user_id, role.id, reason=reason)
  File "C:\Program Files\Python36\lib\site-packages\discord\http.py", line 214, in request
    raise NotFound(r, data)
discord.errors.NotFound: NOT FOUND (status code: 404): Unknown Role```
#

i even tried member.add_role(user.id, role.id, reason=reason) same results

#

and i did \@role to get role id

#

please ping me if u have a clue what im doing wrong i been at this for 40+ min now

#

or dm me what ever is easier for you

upper ember
#

did they change .fetchMessage in discord.js v12?

gilded blaze
upper ember
#

Thanks! @gilded blaze

lusty dew
#
module.exports.load = (client) => {
    client.commands[`purge`] = {
        run(message){
            if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.reply("Sorry you can't use this command")
            if(!args[0]) return message.channel.delete("Rip")
            message.channel.bulkDelete(args[0]).then(() => {
                message.channel.send(`Cleared ${args[0]} messages`).then(msg => msg.delete(5000))
            })
        }
    }
}
#

Can someone help me?

#

It says args is not defined

#

but idk how to define args

zealous veldt
#

well

#

where did you get that from?

#

args is never defined

#

you probably need to be passing more than just client from the looks of it

lusty dew
#

Okie

#

But

#

The way I have my stuff set up

#

it only needs client

#

to be passed

#

Oh wait

#

I think i know how to fi it

#

fix*

sick cloud
#

background: linear-gradient(135deg, #FE3383, #FD8E14); why isn't this working?

lusty dew
#

How cna I restrict a command to one channel?

#

So it can't be used outside any other channel

sick cloud
#

@lusty dew in the command, return if the channel id isn't the id of that channel

#
if (msg.channel.id !== "allowed id") return;```
ie. in djs ^^
lusty dew
#

Ok

#

Ty

sick cloud
#

np

loud bear
#

I got the automatic role assigment to work after 50 min XD

floral stone
#

How do you update something daily in the background automatically in python3?

#

Like every 24hrs

cold harness
#

have you used the code for the python DBL api?

#

it gives a good example of an async loop that you can run, then wait for 24 hours to run again

#

you can make a randomizer that chooses the "daily background"

floral stone
#

I don't need it for the api but feel free to link me

cold harness
#

but you probally should use the API to post your server count ^-^

floral stone
#

I'm not trying to post my api count, I already got that. The background app is for something else...

cold harness
#

oh perfect

#

let me give you an example

floral stone
#

Thanks!

cold harness
#

note how the update_stocks() function is run every 3600 seconds in async

#

1 day is like 86400 seconds

floral stone
#

Ah, I see. That makes tons on sense. Is there any way I can see how many seconds I got left in the loop before it refreshes?

#

I could use datetime module

cold harness
#

you can make it trigger like every 30min, but have an if statement when time.time() = [12:00am]

floral stone
#

i see how but will it take up memory checking every second?

cold harness
#

pls don't do it every second

floral stone
#

Yeah, I see.

#

I got it now

cold harness
#

python'll usually dispose of extraneous memory, but every second may lag the async loop

#

maybe like 5-10minutes

#

oh be sure to account for accedentally going over 12:00

floral stone
#

Yeah, what i'm gonna do is check if the date changed every 10 minutes and if so, I run code to generate the scopes.

slate kayak
floral stone
#
    def __init__(self, bot):
        self.scopes = ["coins", "hp", "damage", "nekobucks", "event", "moves"]
        self.today = '2018-7-6'
        self.bot.loop.create_task(self.update_scopes())

    async def update_scopes(self):
        now = datetime.now()
        day = '{}-{}-{}'.format(now.year, now.day, now.month)
        if day != self.today:
            fields = ["coins", "hp", "damage", "nekobucks", "event", "moves", "nothing"]
            today_scopes = []
            for x in range(1,7):
                today_scopes.append(choice(fields))
            self.scopes = today_scopes
            self.today = day
        await asyncio.sleep(900)
#

@cold harness

#

That looks nice, ty.

cold harness
#

nice

sick cloud
#

@slate kayak it means your bot cant access that resource/channel

feral swift
#

Can anybody help me making my bot?

spice coral
#

What type of bot do you wanna make?

#

And what do you mean by "help"

earnest phoenix
#

a multipurpsoe all in one moderation bot POGGERS

spice coral
#

Well thats something very fresh xD

earnest phoenix
#

yes mmLol

feral swift
#

discord.js

#

multi-purpose

spice coral
#

Why dont u try something different?

feral swift
#

i only got discord.js stuff

rustic obsidian
#

Hi, how do i add my bot to this server?

bright spear
feral swift
#

.....???????????

bright spear
#

@feral swift we're not gonna teach you how to code, go to those sites and learn discord.js and come back when you have a specific question

feral swift
#

i am just askin, does anyone wanna do a bot with me

bright spear
#

I doubt it

rustic obsidian
#

It says "Max 140 chr" but says i need atleast 300.

#

"Too short" and then "Too long"

#

Nevermind i got it.

bright spear
#

Max 140 is for the short desc

feral swift
#

ye i would doubt it

bright spear
#

Min 300 is for the long desc

feral swift
#

the one that is black and says 1

#

is ur long list

tame meadow
#

help

trail cypress
#

No

#

:)

earnest phoenix
#

can somebody tell me why is ${client.guilds.size} and ${client.users.size} only display 0 rather than before which is 10 and 11097?

lament rock
#

if you set those variables in a global scope before your bot logs in and then reference those variables, they will do that

#

ex:

client.login();

client.once("ready", ()=> {
    update();
});

const statuses = [
    [`with fire | ${client.users.size} users`, "PLAYING"], [`dumb code | ${client.guilds.size} servers`, "WATCHING"]
];
const update = () => {
    let [name, type] = statuses[Math.floor(Math.random() * statuses.length)];
    client.user.setActivity(name, { type });
}

When the status is set, it will display as 0 because when you create a new client, it uses an empty client object then logs in and then fetches objects from discord and fills that data. and since you're not waiting to log in and that code is in a global scope, it inherits the empty client's object and properties

#

to fix this, you'd have to put statuses and update inside the ready event

earnest phoenix
#

ok

raw elm
#

@gleaming glen benim botum neden atıldı burdan

topaz fjord
earnest phoenix
#

@topaz fjord

ruby dust
#

lets see the token

#

wow, there is no token

topaz fjord
#

also rainbow roles isn't allowed

ruby dust
#

oh there is

#

now that I know your token you might wanna regenerate it

knotty steeple
#

what where

topaz fjord
#

mfw you gets ads on pastebin

earnest phoenix
topaz fjord
#

lmfao

knotty steeple
#

possible spam detected

#

same

topaz fjord
#

pastebin flagged it as spam

#

use hastebin

earnest phoenix
#

okey

ruby dust
#

regenerate your token, cause I still have the pastebin page open the one with your token

earnest phoenix
#

@topaz fjord

ruby dust
#

sigh, ignoring me twice in a row facepalm

topaz fjord
#

Found your problem

#

You defined it as bot but you used client at the bottom

#

Also Regen your token

#

And rainbow roles aren't allowed

ruby dust
#

turtle since he is only listening to you tell him to regerenate his token

topaz fjord
#

And you don't need more than 1 message event

#

@ruby dust already did

uneven rover
#
client.on("message", (message) => { if (message.content.startsWith("/kick")) { // Easy way to get member object though mentions. var member= message.mentions.members.first(); // Kick member.kick().then((member) => { // Successmessage message.channel.send("👋 " + member.displayName + " has been successfully kicked 👉 "); }).catch(() => { // Failmessage message.channel.send("Access Denied"); }); } });```
#

This line is not defined

earnest phoenix
#

@topaz fjord I replace it by what client

knotty steeple
#

var prefix = ("+");

uneven rover
#

it should be bot.on

knotty steeple
earnest phoenix
#

thanks

topaz fjord
#

It should be bot.on since you defined it as bot

#

And like I said you don't need more than 1 message event

earnest phoenix
#

at RESTMethods.login (c:\Users\Invite\Documents\Bot\node_modules\discord.js\src\client\rest\RESTMethods.js:33:12)
at Client.login (c:\Users\Invite\Documents\Bot\node_modules\discord.js\src\client\Client.js:279:30)
at Object.<anonymous> (c:\Users\Invite\Documents\Bot\main.js:13:5)
at Module._compile (module.js:650:14)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
(node:2352) 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: 3)
warning.js:18
(node:2352) [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.
warning.js:18

1
Li 282, Col 5Espaces : 4UTF-8CRLFJavaScript00Attachement automatique : Désactivé

uneven rover
#

invalid token

topaz fjord
#

oh

earnest phoenix
#

yes syntax

#

trhanks

topaz fjord
#

What syntax said

#

Also hastebin errors next time it's easier for all of us to read

knotty steeple
#

or codeblock

topaz fjord
#

still cancer on mobile

knotty steeple
#

who uses mobile

uneven rover
#

seems fine, when you got used to it

topaz fjord
#

I usually go to hastebin on mobile and request desktop site

#

Then zoom in

earnest phoenix
#

thanks you

uneven rover
#

i use mobile when im away xD

earnest phoenix
#

bot is ready

topaz fjord
#

np

#

I use mobile to help people when I'm going to school

uneven rover
#

and i review and do eval on mobile mostly

topaz fjord
#

Can't do eval on mobile since auto correct

uneven rover
#

xd disable autocorrect....

#

id say pc is still better, always better

earnest phoenix
#

at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
Waiting for the debugger to disconnect...
SyntaxError: await is only valid in async function
vm.js:80
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3

#

@topaz fjord ?

inner jewel
#
  1. dont random ping
wide raven
#
  1. make it an async function
topaz fjord
#

huh

inner jewel
#
  1. you need to be inside an async function (or closure) to use await
wide raven
#

as the error says

sinful lotus
#
  1. learn to not copy paste code
inner jewel
#
x(()=>{
    await y(); //wrong
})```
#
function x() {
    await y(); //wrong
}```
#

async () => {...}
and
async function ... would fix it

cursive ravine
#

Hi ! how can i send custom emoji on discord.js ? i tried so many things and it won't work 😦 ?

west raptor
#

<:emoji:id>

cursive ravine
#

not working and i dont know why x)

#

message.channel.send(":qmark:494465837420380170")

west raptor
#

not like that

cursive ravine
#

forgot the <>

west raptor
#

yea

cursive ravine
#

i tried this also :/

#

message.channel.send(":qmark:")

#

Why does it do that

west raptor
cursive ravine
#

i dont get it sorry i'm dumb

#

xD

west raptor
#

it would be message.channel.send('<:emoji:emoji-id-here>')

cursive ravine
#

Ok

#

i'll try that

west raptor
#

you know how to get that?

cursive ravine
#

yeah

#

tysm

west raptor
#

np

cursive ravine
#

it works 😉

#

u r the best

west raptor
#

😄

cursive ravine
earnest phoenix
lament meteor
#

wats the cool down stuff @earnest phoenix show that part of the code

earnest phoenix
#

Ok

lament meteor
#

wried

earnest phoenix
#

Anyway gtg

jagged sun
#

Anybody cding with JDA?

signal saffron
#
npm ERR! errno 1
npm ERR! integer@1.0.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the integer@1.0.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Thyke\AppData\Roaming\npm-cache\_logs\2018-09-26T12_52_20_
836Z-debug.log

C:\Users\Thyke\Desktop\Vice'sss>``` Error when installing quick.db
earnest phoenix
#

help

#

me

#

i made a website i got the domain now how do i host it using nginx on windows

lusty dew
#

I am trying to make it so if they say

-coinflip heads and it lands on heads they get 5 coins tails they get 5 coins taken away
or vise versa

#
module.exports.load = (client) => {
    client.commands[`coinflip`] = {
        run(message){
            client.loadUserData(message.author.id, data => {
                let coin = ["Head", "Tail"];
                let result = coin[Math.floor(Math.random() * coin.lenght -1)]
            })
        }
    }
}
#

This is what I have so far

earnest phoenix
#

@lusty dew coin.length*, not lenght

lusty dew
#

Yea

#

I fixed that

#

Thank you though!

earnest phoenix
#

i mean you could use a db like mongodb, mysql or postgres

lusty dew
#

I am lol

#

MongoDB

earnest phoenix
#

🤔

#

nice

lusty dew
#

Yea

#

Problem is

#

I don't remember how to detect if they say heads or tails

#

and for it to match up with what is sent out

earnest phoenix
#

use arguments?

#

if (args === "heads") { //your code } smth like that i dunno

lusty dew
#
                let coin = ["Head", "Tail"];
                let result = coin[Math.floor(Math.random() * coin.length -1) * 2]
#

Also

#

It is only sending out Heads

#

and not Tails

#

when it tries I get an error

earnest phoenix
#

try coin[Math.floor(Math.random() * coin.length)]

lusty dew
#

Maybe I should get rid of that -1

earnest phoenix
#

yeah

lusty dew
#

Yea

#

That worked

#

Also

#

How would I check if what they say matches with what is put out?

earnest phoenix
#

Ok

wide ruin
#

`(node:9414) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined

at Object.module.exports.run (/app/commands/points.js:4:32)

at Client.client.on (/app/server.js:62:31)

at emitOne (events.js:116:13)

at Client.emit (events.js:211:7)

at MessageCreateHandler.handle (/rbd/pnpm-volume/8f2a7c19-de8e-4c4e-9bbb-ea649f9acb17/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)

at WebSocketPacketManager.handle (/rbd/pnpm-volume/8f2a7c19-de8e-4c4e-9bbb-ea649f9acb17/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)

at WebSocketConnection.onPacket (/rbd/pnpm-volume/8f2a7c19-de8e-4c4e-9bbb-ea649f9acb17/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)

at WebSocketConnection.onMessage (/rbd/pnpm-volume/8f2a7c19-de8e-4c4e-9bbb-ea649f9acb17/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)

at WebSocket.onMessage (/rbd/pnpm-volume/8f2a7c19-de8e-4c4e-9bbb-ea649f9acb17/node_modules/.registry.npmjs.org/ws/4.1.0/node_modules/ws/lib/event-target.js:120:16)

at emitOne (events.js:116:13)

(node:9414) 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: 2)` error on discord.js

#

for the top bit

#
  const key = `${message.guild.id}-${message.author.id}`;```
#

and i dont understand the other

earnest phoenix
#

console.log(message.guild)
console.log(message.author)

#

one of them is undefined

#

console.log((!message.guild ? "guild is undefined" : (!message.author ? "author is undefined" : "everything is fine")));

#

one liner

#

@lusty dew you can compare the message (message.content) with your coin result string

smoky spire
#

If the message was in a dm, then guild will be undefined

wide ruin
#

is there a way to see dms sent to to a bot?

#

discord.js

smoky spire
#

Check message.channel.type or if message.guild is null

wide ruin
#

so on the client.on message

#

say if(message.guild.type == null) {

#

}

smoky spire
#

No

#

if(!message.guild)

wide ruin
#
client.on('message', async (message) => {
  if(!message.guild.type) {
    let log = '438733159748599813'
    message.log.send(args)
    
  }```
smoky spire
#

No

#

Guild.type isn't a thing

wooden shoal
#

Are you trying to check if the channel is a dm?

wide ruin
#

yes

#

i removed .type

wooden shoal
#

message.channel.type === 'dm'

wide ruin
#

so will this work now...

smoky spire
#

That's also not how you send a message to a channel with id

wide ruin
#
client.on('message', async (message) => {
  if(!message.guild) {
    let logger = '438733159748599813'
    message.logger.send(args)
    
  }}```
#

that is my id

smoky spire
#

client.channels.get("idhere").send()

#

You cant just attach a string to message and send to that

wide ruin
#

client.user.get('438733159748599813').send(args)

wooden shoal
#

no

#

client.channels.get

#

And if args is an array, you can't send that

wide ruin
#

client.channels.get('438733159748599813').send(message)

wooden shoal
#

message.content

#

Just message won't send what you want

wide ruin
#

so i have this js client.on('message', async (message) => { if(!message.guild) { client.channels.get('438733159748599813').send(message.content) }

#

is that good?

smoky spire
#

Looks good

#

As long as the id is correct

wide ruin
#

i copied my id straight from the button

#

can you dm @dawn lagoon for me @smoky spire?

earnest phoenix
#

Detailed description of your bot *
HTML & Markdown allowed, minimum 300 characters

1

wooden shoal
#

What

#

What

earnest phoenix
#

i just copy paste here

wooden shoal
#

Ok. what's the problem with it?

#

Ok. what's the problem with it?

earnest phoenix
#

yes

#

can you tell how

wooden shoal
#

What is the problem?

#

Its telling you that you need 300 characters

smoky spire
#

@wide ruin I did it

earnest phoenix
#

i do not know how to description

wooden shoal
#

Write more

wide ruin
#

didnt have anything

earnest phoenix
#

maybe

smoky spire
#

Is there an error?

wide ruin
#
client.on('message', async (message) => {
  if(!message.guild) {
    client.channels.get('438733159748599813').send(message.content)
  }

  if (!message.guild || message.author.bot) return;
  
    let user = message.author.username;```
#

that area of code

smoky spire
#

Are you sure that's the right id?

wide ruin
#

id is right

smoky spire
#

Not according to the error

wide ruin
#

i copied my id again and it was right

smoky spire
#

Did you mention the channel and right click the mention to get id?

wide ruin
#

i right clicked me and selected copy id

smoky spire
#

Oh, it's your id?

wide ruin
#

is that right?

smoky spire
#

Then replace the .channels with .users

wide ruin
#

can you dm @dawn lagoon again please

#

heh

smoky spire
#

Heh

wide ruin
#

how many times did you send it?

smoky spire
#

Once before the error, once after

wide ruin
#

@smoky spire

smoky spire
#

The bot is responding to itself

wide ruin
#

oh

#

how do i prevent that?

smoky spire
wide ruin
#
client.on('message', async (message) => {
  if(!message.guild) {
    if(!message.author.id === '476609928023244801') {
    client.users.get('438733159748599813').send(message.content)
  }}```
smoky spire
wide ruin
#

so it should work now?

#

can you dm it then please

#

it did, thanks!

smoky spire
#

👍

wide ruin
#

is there a way i can dm them back?

sullen path
#

yes

#

use the channel from the event

wide ruin
#

so what would it look like?

sullen path
#

I'm not a js dev ¯_(ツ)_/¯

wide ruin
#

ok

#

anybody else?

cosmic swallow
#

ok , can someone help me , Im trying to make a !setchannel command in py async , to let the welcomer send in the mentioned chat ...

#

but how would that work 🤔

earnest phoenix
#

well probably save the channel is in a database when the command is used

cosmic swallow
#

ye ik , but I need the server ID too no ? to let the bot see on what server someone joined 🤔

ruby dust
#

my way of doing that would be defining a dictionary

#

a server id is the key and the channel id is the value

cosmic swallow
#

mmm

exotic fog
#

Is there a way to log upvotes?

cosmic swallow
#

ye

#

idk how but it is possible

earnest phoenix
#

listen to votes with a webhook and log them?

exotic fog
#

Yes

earnest phoenix
#

yes

exotic fog
#

Where do I find the info about how to do it?

wide ruin
#
client.on('message', async (message) => {
  if(!message.guild) {
    if(message.author.id !== '476609928023244801') {
      let embed = new Discord.RichEmbed()
      .setTitle(message.content)
      .setDescription(message.author.tag)
      .addField('ID:', message.author.id)
    client.users.get('438733159748599813').send(embed)
  if(message.author.id === '438733159748599813') {
    if(message.channel.startsWith('//dm')) {
    message.content.split(message.mentions.first)
    let msg = message.mentions.first
    msg.send(message.content.split(message.content.split(message.mentions.first)))}}}}``` i got a message from them, and when i did //dm <@their id> hi!, they got nothing sent by the bot
#

discord.js

#

any idea?

#

@sullen path

inner jewel
#

don't ping random people

wide ruin
#

They were helping me earlier

inner jewel
#

and?

#

read the channel topic

wide ruin
#

It's the same DM command stuff

earnest phoenix
#

can we have a dev channel for people who have some tiny morsel of critical thinking skills

inner jewel
#

also he said he's not a js dev so pinging him will help you in no way

wide ruin
#

Ok

#

Sorry

#

But still, can somebody help please

inner jewel
#

you should learn js

#

and read the docs for the library

#

message.channel.startsWith

earnest phoenix
#

splitting by mention

inner jewel
#

msg.send(message.content.split(message.content.split(message.mentions.first)))}}}}

earnest phoenix
#

dm command in the first place

inner jewel
#

if you clean your code you'll be able to maintain it way easier

sullen path
#

@wide ruin I already said, I'm not a JS dev

earnest phoenix
#

he's been asking dumb q's for ages. never bothered to learn

sullen path
#

no ping pls

earnest phoenix
#

it should be abanned for asking for help with "cannot read property xxx of undefined" in #development or asking what a webhook is in #topgg-api

#

dbl needs to crack down

topaz fjord
#

I've said it a couple time

#

but he doesn't listen

earnest phoenix
#

anyone know a loop command for discord.js/node.js

earnest phoenix
#

what do you mean @earnest phoenix

knotty steeple
#
C:\Users\samurai\Desktop\dat files\Bots\Python\Botta>py -3 botta.py
Traceback (most recent call last):
  File "botta.py", line 1, in <module>
    import discord
  File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\__init__.py", line 20, in <module>
    from .client import Client, AppInfo
  File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\client.py", line 30, in <module>
    from .guild import Guild
  File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\guild.py", line 38, in <module>
    from .channel import *
  File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\channel.py", line 32, in <module>
    from .webhook import Webhook
  File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\webhook.py", line 27, in <module>
    import aiohttp
ModuleNotFoundError: No module named 'aiohttp'

C:\Users\samurai\Desktop\dat files\Bots\Python\Botta>pip install aiohttp
Requirement already satisfied: aiohttp in c:\program files (x86)\python36-32\lib\site-packages (1.0.5)
Requirement already satisfied: chardet in c:\program files (x86)\python36-32\lib\site-packages (from aiohttp) (3.0.4)
Requirement already satisfied: multidict>=2.0 in c:\program files (x86)\python36-32\lib\site-packages (from aiohttp) (4.3.1)
Requirement already satisfied: async_timeout in c:\program files (x86)\python36-32\lib\site-packages (from aiohttp) (3.0.0)

C:\Users\samurai\Desktop\dat files\Bots\Python\Botta>``` wtf is happening
ruby dust
#

did you import aiohttp?

knotty steeple
#

no

ruby dust
#

installing it with pip is not necessary, while importing it to your base code is

knotty steeple
#

wha

ruby dust
#

just do import aiohttp in your code

knotty steeple
#

but i dont need it

#

in my main file

ruby dust
#

then what are you trying to do, and what is your issue

solid cliff
#

he imports discord then discord returns no module named aiohttp sakurathinking

#

oof

#

py -3m pip install aiohttp

knotty steeple
#

Unknown option: -3 usage: C:\Users\samurai\Anaconda3\python.exe [option] ... [-c cmd | -m mod | file | -] [arg] ... Try python -h' for more information.`

#

pls

solid cliff
knotty steeple
#

yes anaconda

#

i need it for something

solid cliff
#

py -3 -m pip install aiohttp

knotty steeple
#

distributed 1.21.8 requires msgpack, which is not installed. discord-py 1.0.0a1536+gfdc7169 has requirement aiohttp<3.4.0,>=3.3.0, but you'll have aiohttp 3.4.4 which is incompatible. pylint 1.8.4 has requirement astroid<2.0,>=1.6, but you'll have astroid 2.0.4 which is incompatible. GWvictoriaNotLikeBlob

solid cliff
#

😩

knotty steeple
#

ImportError: cannot import name '_psutil_windows'

#

nice

#

nice

solid cliff
#

smh

heady zinc
#

uninstall python

knotty steeple
#

lmao

#
Ignoring exception in on_ready
Traceback (most recent call last):
  File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\client.py", line 221, in _run_event
    await coro(*args, **kwargs)
  File "botta.py", line 30, in on_ready
    bot.load_extension("cogs.info")
  File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\ext\commands\bot.py", line 694, in load_extension
    lib = importlib.import_module(name)
  File "C:\Users\samurai\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\samurai\Desktop\dat files\Bots\Python\Botta\cogs\info.py", line 4, in <module>
    import psutil
  File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\psutil\__init__.py", line 147, in <module>
    from . import _pswindows as _psplatform
  File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\psutil\_pswindows.py", line 17, in <module>
    from . import _psutil_windows as cext
ImportError: cannot import name '_psutil_windows'```
#

this is the

#

uh

#

traceback

#

@solid cliff

solid cliff
#

disable psutil mm

#

smh cannotfind anything

junior hornet
#

hi i am new to bot making after it gets approved can i still edit the code

knotty steeple
#

fucking anaconda

#

so do i uh

west raptor
#

@junior hornet yes...?

knotty steeple
#

only have anaconda installed

west raptor
#

yes

knotty steeple
#

and not actual python

junior hornet
#

thx

knotty steeple
#

@solid cliff

solid cliff
#

whyneed anaconda

knotty steeple
#

needto install llvmlite

#

with conda

#

i heard its simpler ™

solid cliff
#

tsk

knotty steeple
#

pls

#

ok ill uninstall i guess

solid cliff
#

inb4 doesn't work4u

west raptor
#

@knotty steeple oh btw anaconda takes forever to uninstall

#

have fun

knotty steeple
#

yea i know

#

i already uninstalled it before mmLol

west raptor
#

oof

knotty steeple
#

wait how do you know

#

have you used it mmLol

#

and why mmLol

west raptor
#

maybe mmLol

#

also

#

idk

#

because like

knotty steeple
#

lok

west raptor
#

just installing py normally was like not working

#

so i installed anaconda

#

lOl

solid cliff
#

smh

earnest phoenix
#

Can somebody tell me is there a way to run a discord bot with multiple coding languages?

west raptor
#

in 1 instance, no afaik

#

with multiple instances, yes

smoky spire
#

Why would you want to though

earnest phoenix
#

How can I create an instance?

west raptor
#

. -.

#

like

#

just

#

lets say

#

you have a bot running

#

with the lib d.js

#

you can run the same bot, under the same token, in a different lib, or same lib

earnest phoenix
#

Does it still works?

west raptor
#

what

inner jewel
#

depending on what you use you can have multiple languages in one instance

#

eg graalvm can mix java, python, js, ruby and r in a single instance

knotty steeple
#

but

#

why

earnest phoenix
#

Because why not? XD @knotty steeple

knotty steeple
#

also

#

how do i download gcc

west raptor
#

i couldnt figure that also

#

lmfao

knotty steeple
#

you dont even have a good js bot

#

why go to different langauges

earnest phoenix
#

Because I just noticed I am not really good at js than python

knotty steeple
#

rewrite the bot like pls GWvictoriaNotLikeBlob

west raptor
#

but why combine multiple languages

#

i still dont understand why

inner jewel
#

gcc should be just a single command

#

to install

#

there's stuff that's easy to do in lang x and stuff easy to do in lang y

knotty steeple
#

how tho

earnest phoenix
#

Actually I was just asking

inner jewel
#

and normally running both in one process you can get more performance out of it

earnest phoenix
#

Ok gtg bye

knotty steeple
#

i need to install on windows

earnest phoenix
#

Plus do not go it music #1 are else you will hear a song full with inappropriate things

#

“Inappropriate”

#

Ok the song finished lol

#

bye

inner jewel
#

why on windows

#

just use vc++

knotty steeple
#

oh

#

ok

earnest phoenix
#

How to fix it

knotty steeple
#

check if its ur id

#

if not dont run

#

if it is run

restive moss
#

hola alguien habla español aqui?

earnest phoenix
#

no

restive moss
#

u.u

#

xD

#

de que se trata este grupo?

earnest phoenix
restive moss
#

O.o

tepid spear
#

Hey im trying to work on A bot that helps yo build rollercoatsers but never started on discord bots before

knotty steeple
#

wat

tepid spear
#

im trying to make a bot that makes images of roller coasters and theme parks for ya

#

but have no idea where to start

earnest phoenix
#

what programming languages do you know

tepid spear
#

C#

earnest phoenix
#

makes images?

#

if you want like legit random image generator

#

i would start out with getting assets and pngs of rides and such

#

a background image

#

and set locations on that backgroudn images where rides are allowed to be placed

#

and then randomly select images to fill those locations when you generate

lusty dew
#

Ok

#

I need help

#
try{
          if(Fam.Niya.includes(message.author.id)) return message.channel.send('**Ɛ>** __I Wuv Yue__ **<3**')
          if(Fam.owner.includes(message.author.id)) return message.channel.send('you are an owner\n (Test A1)')
      }catch(err){
          console.log(err)
      }
message.channel.send(`A direct message?\n I've heard these places are scary... Please message me in a server, ${message.author.username}`)
  }
#

It is not sending

#
message.channel.send(`A direct message?\n I've heard these places are scary... Please message me in a server, ${message.author.username}`)
  }
#

This one

topaz fjord
#

It's not in the catch { }

lusty dew
#

Oh ok

inner jewel
#

it should still work regardless

#

the catch block doesn't return so it just executes what's below

topaz fjord
#

but I don't see a reason why you would keep it outside tho

inner jewel
#

that'll work either if it throws or if none of the ifs match

lusty dew
#

Full code^

#

the

#

Fam.Niya and Fam.owner

#

the ID for the Fam.Niya

#

is also in owner

#

so when the user named Niya dms the bot it only sends one of those messages

#

and not the one with the Fam.owner

smoky spire
#

Because you return after the Niya check

lusty dew
#

ah ok

earnest phoenix
#

my bot is not posting server count

#

🤔

#
client.on('ready', async () => {
    await client.log('Successfully connected to discord.')
    await client.user.setActivity(client.settings.activity, { type: 'Playing' }).catch(e => client.cannon.fire('Could not set activity.'))
    await client.log(`Successfully set activity to ${client.settings.activity}`)
    await client.loadCommands(() => client.log(`Successfully loaded commands!`))
    await client.loadNPC(() => { client.log(`Successfully loaded npc's`)})
    await client.connectDB(() => client.log(`Successfully connected database.`))
    if(client.settings.devmode == false){
        const dbl = new DBL(client.settings.DBL_token, client)
        dbl.on('posted', () => {
        client.log('Server count posted!')
        })
    }
})
#

settings.json contains

#
{
    "devmode" : false
}
#

and the token is correct

dusk thorn
#

@earnest phoenix this is how I did mine and I know it works

#

dbl.postStats(bot.guilds.size)

#

Where dbl is defined by a const above it

earnest phoenix
#

mk

#

ill pop that in

dusk thorn
#

const dbl = new DBL('token', bot);

earnest phoenix
#

by that logic cant i manipulate the number just by passing it one?

dusk thorn
#

Yes.

earnest phoenix
#

i thought it was integrated for that reason

#

lol

dusk thorn
#

As far as I'm aware it's not safeguarded in any way it's just that mods exist and could spot the significant difference

earnest phoenix
#

what kind of logic is that?

dusk thorn
#

But as well as bot lists put trust on the devs that they won't do such things

earnest phoenix
#

some neat client property cross refrencing could help that

dusk thorn
#

Like I said I'm not sure if it's safeguarded or not, my knowledge at this moment tells me it's not

earnest phoenix
#

im willing to say its against their TOS

#

if anything

#

but going back to my question

#

poststats is required?

dusk thorn
#

I'm sure you'd get your bot deleted and possibly you banned for doing that GWqlabsFeelsLULMan

#

you mean dbl.postStats?

earnest phoenix
#

mhm

dusk thorn
#

how else are you gonna tell it what to post GWfroggyZoomeyes

earnest phoenix
#

well it has done it with what i have all the way up to this point

#

maybe its cause im running it with pm2 not allowing it to reset entirely 🤔

dusk thorn
#

GWcmeisterPeepoShrug I gave you the way I do it and it's never not worked for me

earnest phoenix
#

still no

#

🤔

#

thoroughly confused

#
client.on('ready', async () => {
    await client.log('Successfully connected to discord.')
    await client.user.setActivity(client.settings.activity, { type: 'Playing' }).catch(e => client.cannon.fire('Could not set activity.'))
    await client.log(`Successfully set activity to ${client.settings.activity}`)
    await client.loadCommands(() => client.log(`Successfully loaded commands!`))
    await client.loadNPC(() => { client.log(`Successfully loaded npc's`)})
    await client.connectDB(() => client.log(`Successfully connected database.`))
    if(client.settings.devmode == false){
        const dbl = new DBL(client.settings.DBL_token, client)
        dbl.on('posted', () => {
        client.log('Server count posted!')
        })
    }
})``` ```
{
    "devmode" : false
}```
#

reposting for bump

#

whats wrong 🤔

#

maybe its because its async?

#

let me pull out of the func

dusk thorn
#

Wait since when was a .then not required

earnest phoenix
#

yea thats why

dusk thorn
#

for dbl.on

earnest phoenix
#

it twas because it was in an async function

dusk thorn
earnest phoenix
#

was woundering why it would never update

#

now i know

#

dbl does not like being forced asynchrony

#

i need to write a better docs

#

:/

dusk thorn
#

I don't have a docs for my bot

#

Yet

earnest phoenix
#

👍

#

i keep mine on a website and the dbl description xD

#

the dbl description for mine is a mile long

#

now

dusk thorn
#

I have it setup for upcoming bit of docs tho

earnest phoenix
#

i just wrote some quick pretty animations, grabed a css framework, and threw something together

#

not mobile friendly by any means

#

wanna check it?

earnest phoenix
#

I need some help with an html to image gemerator for my core .net bot on c#, i know a good one thats called NReco but thats only free on a framework and my bot is core, are there any free html to image generator dll’s that are free and support core? If so please dm me or ping me with the answer because it would mean the world for me if i finally have image generation on my core bot!

restive silo
#

html to image? Thenky

#

you wanna display websites as images or what @earnest phoenix

earnest phoenix
#

@restive silo no just html code to image

#

So i can make custom images

#

We have a guy in the crew that knows how to make it but we dont have a package or anything to do it with :/

restive silo
#

you cant do html code to image

#

whatever that means

earnest phoenix
#

@restive silo you can

restive silo
#

dont really know what you mean

earnest phoenix
restive silo
#

if you want render html as an image i would recommend this https://github.com/ArthurHub/HTML-Renderer

#

its cross framework and supports core

earnest phoenix
#

Hmm ill look into it

restive silo
#

and its also not external

#

its on nuget

earnest phoenix
#

We just want have the image generation finally so we can make certain things more fancy

#

Like we have searched for 2 weeks now lmao

restive silo
#

well you can also generate images without that but why do you even want html code to image

#

like

#

whats an imagemagick implementation into C#

earnest phoenix
#

We dont know how to use magick.net and nobody has time to learn it because of college and stuff and 1 of the guy knows how to make fancy image generation with html but he did it on framework

#

So that saves us time

restive silo
#

meh

#

would probaly still recommend looking at Magic.net since its extremly easy to get into if you know C# and its performant while having a nice Interface

#

but yea

#

your choice

earnest phoenix
#

We will probably switch once everyone has time like most of 2 have work, 1 has exams and im just very busy with the hospital rn

#

But maybe i can try to get to do it now with then

#

Them*

restive silo
#

just look the docs up and mess around

#

thats mostly how you get into stuff

earnest phoenix
#

Ye

#

Like idc what we use i just want to have image generation finally

restive silo
#

when you wanna scale i would care

earnest phoenix
#

Wym?

restive silo
#

if you wanna have a performant way of image generation what would even work performant with idk 20k servers i would compare different ways & libs to do it

#

because if you dont and choose a lib/way whats bad you would need to rewrite later

earnest phoenix
#

Yea ill think im gonna try to push the idea of magick.net to my crew

quartz kindle
#

what kind of image generation? what do you want to do?

earnest phoenix
#

Welcomes image, game stats for example, fancy profile even maybe some more unique things

restive silo
#

C# image manipulation, ImageMagick implementations are quite common for that like Pythons Wand, C# Magic.Net and Co

earnest phoenix
#

I also wanna use it for my side bot thats sorta like a scifi/space themed rpg bot

quartz kindle
#

to display in a website its much better to use client-side image generation, like canvas and svg

#

for a bot you need server side

restive silo
#

he wants for a C# bot

earnest phoenix
#

^^

restive silo
#

for node i would probaly recommend Canvas thats backed by Cairo

quartz kindle
#

c# does have a canvas class

restive silo
#

only framework or thinkEyes he wants for .Net core

#

also i heard that Microsoft wants to ditch .Net framework and only Continue support for Core aswell as implement the stuff form .net framework into it somehow

#

not to sure about that

earnest phoenix
#

Im about 1 thing sad that is we arent allowed to make users download any .exe file even its from a site that would be able to edit the bot through a winform else it would be way easier to make a dashboard then through site, but that just means my crew need learn php and such thats fine i guess

quartz kindle
#

you want users to edit an image through a website dashboard?

#

and then send the image to the bot?

earnest phoenix
#

No no just an web dashboard ins general, it basically a whole different problem we have because nobody knows how to make a webdashboard

#

We will maybe soon tho who knows lol

earnest phoenix
#

@restive silo do you use magick.net for any image generation? Or do you even have image generation or such

cursive ravine
#

Hi everyone ! i woud like to know if there is any way i can eval the server names my bot is in ?

ruby dust
#

go through all servers your bot is in and append their names into a list, then print that list as one string

earnest phoenix
#

yes there is a way

#

with basic programming knowledge

#

and 1 minute of readthedocs

cursive ravine
#

OK

#

xD

earnest phoenix
#

👍

cursive ravine
#

Sorry :p

#

i just found what i'm searching for thanks and i'll remember to read the docs first 😉

sullen path
#

@earnest phoenix can I get that read the docs emote? I’m on mobile so I can’t do the thing

sullen path
#

👌

cosmic swallow
#

status = ['with ZeroLand', 'z!help for help', 'on {}'.format(client.servers)] so my bot doesnt plays the servercount , but says Playing on dict_value([])

ruby dust
#

show more code

lusty dew
#

How can I make it so I can ban the person by ID and by mention?

ruby dust
#

What lib?

lusty dew
#

Discord.js

ruby dust
#

I'm sure there is a way in d.js to define the argument itself to default to a member object

lusty dew
#

Could i Do

#
let userID = message.content.split(' ').splice(1)
#
let bUser  = message.guild.members.get(userID)
#

I know that gets everything after the command name

#

I honestly only want it to get the ID I say so it doesn't get the reason

quartz kindle
#

splice modifies the original input. so if you save the message array in a variable, and use splice on it, then the original array gets modified as well

earnest phoenix
#

I know what he wants

#

Use the logical or operator

#

If the mention is null, fetch the user by ID

quartz kindle
#

example for how to split the id from the ban reason in a message```js
let array = message.content.split(" ");
let id = array.splice(1,2);

//array = content 0 and 2 (splice removed content 1 from the original array)
//id = content 1```

earnest phoenix
#

@quartz kindle shh...this is irrelevant

lusty dew
#

xD

quartz kindle
#

how is this irrelevant? its basic js

ruby dust
#

discord.py has it's own way to defaut the argument to be a specific object you want, for example:

@commands.command()
async def ban(ctx, member: discord.Member)
```doesn't discord.js have something similar to that?
restive silo
#

@earnest phoenix i dont do C# image manipulation but i have friends who do and told me that Magic.net is really good

#

thats why i recommend it

earnest phoenix
#

@quartz kindle because that's not what he asked at all

lusty dew
#

I want to be able to ban by iD and Mention

quartz kindle
#

I know that gets everything after the command name I honestly only want it to get the ID I say so it doesn't get the reason

#

this denotes confusion regarding how to separate and assess the parts in a message content

ruby dust
lusty dew
#

Yes

quartz kindle
#

im just clearing up his confusion

#

that is a requirement before even tacking the question itself

earnest phoenix
#

Oh there was confusion?

quartz kindle
#

there is always confusion

#

specially after helping him for days

#

lol

lusty dew
#

Hm?

earnest phoenix
#

Can't deny that haha

lusty dew
#

Helping me for days?

earnest phoenix
#

Maybe I assume people's knowledge too much

lusty dew
#

.

earnest phoenix
#

Damn @restive silo im a lil sad about that because if you did i cpuld have asked you sometimes for help with it

restive silo
#

jynEHEH sorry about that

earnest phoenix
#

Its fine

#

Im mostly thinking about how i could as an url like my avatar url link to add to a for example profile command because idk if magick.net accepts url images if that makes sense

restive silo
#

you would download the image to an byte arrary and then work with it

earnest phoenix
#

Ah ye

#

Its more work but if it works its okay i guess 🤷🏼‍♂️

#

But still depend what my crew thinks of the idea tho

inner jewel
#

banning by id/mention can just use a regex to extract ids from mentions

#

(?:<@!?)?(\d+)>?

#

replace that with $1

#

eg arg.replace(/regex/, "$1")

lethal niche
#

Hi

#

I have à little problem with my bot x(

#

See

#

ˆ

#

The script

topaz fjord
#

It says message is not defined right in the error

knotty steeple
#

do you even have a text editor

#

besides notepad

earnest phoenix
#

french tickYes windows tickYes property of undefined tickYes on desktop tickYes no text editor tickYes roblox AND fortnite tickYes

#

this has to be a joke post there is no way that guy is real

knotty steeple
#

hey i use windows pls

earnest phoenix
#

do u run or bot on windows?

knotty steeple
#

no i have a host mmLol

earnest phoenix
knotty steeple
#

well my python bot yes

#

but

#

python is shit so

loud salmon
#

@earnest phoenix dont forget about the (cracked?) minecraft mmLol

earnest phoenix
#

hahaha tru

#

and windows media player

loud salmon
#

haha yes

earnest phoenix
#

(yes i’m on my phone)

earnest phoenix
#

reportschannel is undefined, simple

#

glitch? /

#

more like

#

nvm

granite tartan
#

hey guys i need help GWfroggyJerry

#

useless 😔

west raptor
#

@granite tartan hi

#

wut u need help with

granite tartan
#

okay so

#

I'm starting university in like

#

2,5 weeks

#

computer science

west raptor
#

yuh

earnest phoenix
#

not a number

granite tartan
#

and I just found out we're gonna learn java

west raptor
#

ok...?

granite tartan
#

any of you guys have good sites that can prepare me a bit

west raptor
#

hm

earnest phoenix
#

library

west raptor
#

codecademy

earnest phoenix
#

google

granite tartan
#

google whats that

#

no I just wanted to know what you recommend from your personal experience lol

west raptor
#

i havent learned java on codecademy

earnest phoenix
#

wait how is reportschannel undefined
it is clearly defined there

west raptor
#

but i have learned a few other langs on there

granite tartan
#

oh okay

#

ty,ill check it out

west raptor
#

np

fossil oxide
#

@granite tartan dropout

granite tartan
#

heck off oliy

fossil oxide
earnest phoenix
#

Lol

rustic axle
#

Java is shit

junior hornet
#

Hi I forgot to add a sever count can someone help with the code it discord.js

stray wasp
junior hornet
#

Ok thx

earnest phoenix
#

How do I find out who Upvoted my Bot, like their IDs and info about it

#

Trying to make a Reward System on Upvotes

#

(Pls ping me if you're answering)

west raptor
#

@junior hornet i mean dont use those

#

those are outdated

#

what lang you use

junior hornet
#

Oh ok discord.js

west raptor
#

^ @junior hornet

queen sentinel
#

ads

west raptor
#

boi

lusty dew
#

boi

earnest phoenix
#

you put it in the auth header

#

then you can do things requiring auth

#

also

#

the dbl api gets thing