#development

1 messages Β· Page 957 of 1

stable dirge
#

😭 no english xd

earnest phoenix
#

wut

prime glacier
#

i just tried module.exports = { name: "setupmute", category: "moderation", usage: "setupmute>", description: "Setup the mute role", run: async (client, message, args) => { let muterole = message.guild.roles.cache.find(r => r.name === "Muted") if(!muterole) { try{ muterole = await message.guild.roles.create({ data: { name: "Muted", color: "#514f48", permissions: [] } })

earnest phoenix
#

cuz u didnt add the catch()

prime glacier
#

where?

earnest phoenix
#

add this after try{} :

catch(e) {
 console.log(e)
}
knotty steeple
#

this is why u dont copy code

#

@earnest phoenix btw dont spoonfeed

earnest phoenix
#

ok .. . . .

#

but it is faster :))

#

kidding

knotty steeple
#

okay

#

its a fucking rule

slender thistle
#

be nice

earnest phoenix
#

@knotty steeple relax

#

bro

knotty steeple
#

??

earnest phoenix
#

nvm

#

@prime glacier ?? wut happend ?

knotty steeple
earnest phoenix
#

no

#

the code run only when doesnt find that role

#

if (!muterole) {}

#

!

knotty steeple
#

the loop

earnest phoenix
#

where ?

knotty steeple
#

i aint stupid

#

forEach

#

that loop

earnest phoenix
#

i want to do it 2

knotty steeple
#

do what

earnest phoenix
#

that is not the problem right now.

#

Playing game (sublime text)

#

@knotty steeple rich presence

slender thistle
#

Sublime Text has a plugin for Discord rich presence

earnest phoenix
#

:0

lyric mountain
#

how can st have a workspace lol

earnest phoenix
#

Yiffbox

#

why.

knotty steeple
#

how can vscode have a workspace lol

slender thistle
#

Project

lyric mountain
#

in vscode yes, but st is just a fancy text editor like np++

earnest phoenix
#

it has

knotty steeple
#

no?

lyric mountain
#

does it have projects?

knotty steeple
#

obviously

earnest phoenix
lyric mountain
#

errr....that's not obvious ma'am

knotty steeple
#

it is

earnest phoenix
#

my brain is hurting

robust moth
earnest phoenix
#

Ur terminal look bad

#

my eyes hurd

knotty steeple
#

can u paste it

lyric mountain
earnest phoenix
#

@lyric mountain Update ur VSCODE

lyric mountain
#

that's vscode

#

st = sublime text

sinful harness
#

discord presence*

earnest phoenix
#

:0

lyric mountain
earnest phoenix
#

@earnest phoenix not everyone has the same editor or the same design as you, if you dont know then please shΓΌt. This is a place to ask for development help not to shittalk other users preferences

knotty steeple
#

its a folder but vscode names it as workspace or whatever and if u have a brain u could figure it out mmLol

lyric mountain
#

but vscode names it as
again, I'm talking about st

#

vscode != st

earnest phoenix
#

^

knotty steeple
#

what are u saying

earnest phoenix
#

@earnest phoenix sorry, relax :((

knotty steeple
#

"open folder"

#

christ

#

@earnest phoenix wrong extension

earnest phoenix
#

?

knotty steeple
#

get the first one

lyric mountain
knotty steeple
#

be stupid

lyric mountain
#

by asking a question?

knotty steeple
#

with an obvious answer

slender thistle
#

sammy

knotty steeple
#

hi

slender thistle
#

Do I have to remind you

knotty steeple
#

no

turbid bough
#

"Open Folder" = Projects

knotty steeple
#

??? like

lyric mountain
#

yeah, I just wanted to know how to open a project on st

knotty steeple
#

how could u not actually smh

#

@robust moth hi

lyric mountain
#

that single line would be enough at the start

slender thistle
#

A folder is technically considered a project in Sublime and it's not exactly clear at first if you haven't used it before

winter basalt
#

fancy name

lyric mountain
#

I don't use st too often, I was curious because never heard of that

#

I've seem workspace and project, but "folder" is kinda new

digital ibex
#

hi, this is gonna sound like a stupid question.

#

i completed my discord oauth and now idk how i can incorporate the front end and the backend together and make it like

#

interact with each other and stuff

#

this is my first actual time making a public site so i'm kinda very confused

turbid bough
#

use jquery for frontend to retrieve data from the webserver, and use http shit for backend

digital ibex
#

no i mean

#

i got the code, but now how do i like, make it interact with each other

onyx summit
#

jQuery ablobeyesdown

#

over http requests

digital ibex
#

jquery is 🀒

#

vue nice

amber fractal
#

Make an actual backend, I use node with express

#

And I template my pages with ejs

digital ibex
#

i completed some of my backend, but i was told to do both at the same time, like do the backend and then do frontend stuff for like each page, im assuming they meant

#

so, i completed one pages backend, and now im stuck incorporating the frontend onto it to make it half decent

turbid bough
#

you can't really make anything work with backend in the frontend if you have no backend

#

so like, make for example a page that just returns a json string

#

and use client side js to parse that data

digital ibex
#

using express or vue?

onyx summit
#

express is a webserver

#

Vue is a frontend framework

digital ibex
#

o ok

turbid bough
#

jquery is just a way to do http requests in js

digital ibex
#

i just started this project 2 days ago, i'm kinda new to making public sites, sorry about my lack of knowledge about these things πŸ˜„

amber fractal
#

Well it does a lot more than that

onyx summit
#

why would you use fucking jQuery for that

turbid bough
#

idk cause i use it, and i dont know web dev

amber fractal
#

Sounds like a major security flaw

onyx summit
#

what

turbid bough
#

i only jquery.get request to my website, not to discord

digital ibex
#

im confused

onyx summit
#

me too

#

They both seem to talk shit lol

digital ibex
#

Β―_(ツ)_/Β―

#

lmao

turbid bough
#

idk how he means by security flaw 🀷

knotty steeple
#

wss

earnest phoenix
#

jquery is extremely outdated and should not be used in modern web dev

turbid bough
#

aw shit

#

what should i use

digital ibex
#

the thing im most confused about is, i completed the backend with express for one page, and now im trying to use vue for the frontend

turbid bough
#

i only learned jquery cause i probably saw it on w3schools or something

digital ibex
#

and idk how to

earnest phoenix
#

a lot of sites go for SPA frameworks now, react / vue / angular

#

and you can use node-fetch with them

#

why custom emoji don't work when it's between ` ?

turbid bough
#

between ``?

#

cause its not supposed to

#

basicall means ` ` turn anything to UTF-8 text only 😊

#

prob

earnest phoenix
#

so, there is no way to use custom emojis between `` ?

turbid bough
#

idk

amber fractal
#

Well It's just an inline code block

turbid bough
#

nope

amber fractal
#

![mmulu](https://cdn.discordapp.com/emojis/587328389929500692.webp?size=128 "mmulu")

#

No

#

It sends it as actual text

#

Like when you eacape it

turbid bough
#

utf-8

amber fractal
#

:mmLol:

#

Ofc now it doesnt

earnest phoenix
#

you need nitro

#

because discord ℒ️

amber fractal
#

I've done it without nitro before Thonk

knotty steeple
#

i have what are we doing

earnest phoenix
#

you could do it before

#

like a year ago

#

then they started messing with the chat and made it so you can only escape custom emojis if you have nitro (or if you're in the guild w the custom emoji)

knotty steeple
#

tf

amber fractal
#

To prove to someone they could

modest maple
#

@turbid bough iirc its utf-16 as it supports the extended block of unicode

knotty steeple
earnest phoenix
#

oh you're on mobile

digital ibex
#

so, can anyone help me use vue in my project

#

like

earnest phoenix
#

nothing works on mobile like its supposed to, including escaping emojis omegalul

amber fractal
#

Lmao

earnest phoenix
#

@turbid bough but if i do let emoji = bot.emojis.get(id).toString and then i do ${emoji} it won't work ?

digital ibex
#

i got the backend done for one page, and idk how to use vue with it

knotty steeple
#

look at the getting started on the site

amber fractal
#

Why ould they make it nitro only ffs

turbid bough
#

@earnest phoenix uuh, as long as you dont put it in a code block yes

knotty steeple
amber fractal
#

What about the non-nitto devs :(

earnest phoenix
#

moneeeeeeeeey

turbid bough
#

sucks for you

earnest phoenix
#

they don't care about you, they care about your money

dawn trout
#

Can you teach me how to code

digital ibex
#

thank u

amber fractal
#

I mean it still works in between an inline code block

earnest phoenix
#

why do you think they made the dev license so expensive which only allows you to have an announcement channel linked to an SKU lol

knotty steeple
#

no we cant

#

websites can

turbid bough
#

dev license? expensive?

earnest phoenix
#

it's like 35 bucks

slender thistle
#

25

amber fractal
#

It's not worth whatever it is lmao

turbid bough
#

ah well, its kinda is expensive since its per application, not like google where you only need to pay once per acc

amber fractal
#

The only thing people use is the announcement channel

slender thistle
#

I wish to believe their reasoning for it was to restrict it to actual bot devs and people who used bot making websites

dawn trout
#

How about some free bot app?

turbid bough
#

yeah, instead of just allowing random people to make fake stores with fake nitro and rickroll videos

dawn trout
#

You know?

knotty steeple
#

no

turbid bough
#

no

earnest phoenix
#

no one will make you an app for free

amber fractal
#

Even the paid ones are garbage

dawn trout
#

@earnest phoenix have

#

BotGhost and BotBind

earnest phoenix
amber fractal
#

Yeah both suck though

knotty steeple
#

dont use that shit

slender thistle
#

They are not for learning

amber fractal
#

Pretty sure neither are accepted here

turbid bough
#

they are for people who want to easily make a bot to scam people to donate to their patreon

slender thistle
#

They are purely made as services that provide you with templates that you use in your bot

#

Haven't haard about BotBind but BotGhost is allowed as long as you it's modified

lyric mountain
#

modify botghost lol

earnest phoenix
#

they are for people who want to easily make a bot to scam people to donate to their patreon
error out with a command by votelocking it and when they vote error out again saying they have to donate omegalul

amber fractal
#

If anyone uses botghost, they arent gonna modify it mmulu

turbid bough
#

if you modify botghost, you better just make your own bot. than use that bloat

slender thistle
#

Plenty of bots we have reviewed actually had modified instances

#

so

amber fractal
#

And they're probably all bad

slender thistle
#

Thaun, the modifications happen through a """WYSIWYG""" UI where you choose what it does instead of actually coding it

lyric mountain
#

btw, emotes can't be used inside codeblocks/inline code because it converts everything to unicode

turbid bough
#

wtf is a "WYSIWYG" UI

slender thistle
#

what-you-see-is-what-you-get

lyric mountain
#

holy

slender thistle
#

You don't do the actual coding, you just have options to choose

knotty steeple
#

scratch type stuff then

slender thistle
#

"Add Role", "send message", that kind of stuff

turbid bough
#

yeah so like normal any bot with custom commands

slender thistle
turbid bough
#

i wonder if it allows you to connect to a rest api with it

#

that would probably be pretty useful

#

with just the ui

#

and then what it could do is autogenerate schemas depending on what the initial request

#

then use that to make it available as parameters in commands

#

and then you have like a UI for doing rest requests with the disord bot, very easily with all the api references

earnest phoenix
#

soo, even if i define the emoji it returns undefined :/

lyric mountain
#

what are you trying to do?

earnest phoenix
#

i want to use custom emojis between ``

turbid bough
#

ref

#

i think you want to get the whole string?

#

not just the id

earnest phoenix
#

const dmd = bot.emojis.cache.get(":diamond:");

lyric mountain
#

i want to use custom emojis between ``
@earnest phoenix you can't

turbid bough
#

and isnt bot.emojis undefined?

earnest phoenix
#

no

lyric mountain
#

inline code and codeblocks convert everything to unicode

turbid bough
#

no, ok idk js

lyric mountain
#

even normal emojis "can't" be used inside ``

earnest phoenix
#

they can

lyric mountain
#

no

#

what you see isn't an emote

#

but an unicode character

earnest phoenix
#

oh

turbid bough
#

they only show up as what the system shows it as, not what discord wants you to see

lyric mountain
#

which is the same as, say, letter A

earnest phoenix
#

Why they don't update and let us use custom emojis? :/ this is shitty

turbid bough
#

for example πŸ₯Έ this does not support on windows or any platform, but it supports on android phones

lyric mountain
#

πŸ˜€ = \πŸ˜€ = \u1F600

#

the three examples above are the same thing

turbid bough
#

nvm that emote does not what i sent

lyric mountain
#

Why they don't update and let us use custom emojis? :/ this is shitty
@earnest phoenix because custom emojis don't have an unicode char

turbid bough
#

cause its not supported by your operative system to view "custom" emotes

#

only unicode

lyric mountain
#

custom emotes are just ids replaced by images

digital ibex
#

im still confused how i interact my backend with frontend

turbid bough
#

no, the front end interacts with the back end

digital ibex
#

o ok

#

mb πŸ˜“

lyric mountain
#

normal emoji = πŸ˜€ = \πŸ˜€ = \u1F600
custom emote = weirdsip = !weirdsip = ???

#

see the difference?

quartz kindle
#

frontend sends ajax request to backend

#

backend responds

turbid bough
#

if you want to have a constant connection with your webserver, use a websocket

lyric mountain
knotty steeple
#

or just ws

digital ibex
#

im trying to make a dashboard, i've got some backend code done. but now i'm confused how to use vue to like

#

make it uhh

knotty steeple
digital ibex
#

the using vue bit isn't the hard part, its cuz w/ express, u hav app.get('route') and with vue its the same kinda thing

onyx summit
#

socket.io is not Purley websockets, it just might hop over to the websocket protocol ASASYuiNoLike

knotty steeple
#

content-type header returns the type of file right

#

like an extension

quartz kindle
#

yes

digital ibex
#

im really confused

knotty steeple
#

how exactly does it return

earnest phoenix
#

but you can't entirely rely on the header if you want to be certain of the file type

quartz kindle
#

the header defines how the browser will interpret the file

#

for example if the content-type is any of the image mime types, the browser will simply display it

#

if the content-type is text/html, the browser will attempt to render the contents

knotty steeple
#

oh ok

quartz kindle
#

if its an audio mime type, the browser will use its built in html5 media player

#

not all mime types have browser specific behavior, for example application/json is viewed as json in firefox, but as text in chrome

#

because chrome doesnt have any built in way of interpreting json, unless you have an extension for it

turbid bough
#

Wait it doesn't?

#

You mean in console.log? Or something

quartz kindle
#

no, if you load a json file directly in the browser

#

like an url that returns a json response

turbid bough
#

Ah ok

#

Yeah I only see nothing but text

#

XML works tho

#

I think

quartz kindle
#

yeah, firefox does have a json viewer built in

knotty steeple
#

what is the difference between console.log and console.error

quartz kindle
#

chrome doesnt

turbid bough
#

Console.error gives out an error to the browser

#

Console.log does not

quartz kindle
earnest phoenix
#

and also piping

#

console.error goes to stderr

#

console.log goes to stdout

knotty steeple
#

o

golden condor
quartz kindle
#

chrome's dev tools console

summer torrent
#

browser console

golden condor
#

Ok thanks

digital ibex
#

what data would i need in my api for a bots dashboard?

quartz kindle
#

idk what data you want your dashboard to show?

golden condor
#

Guilds, users etc.

digital ibex
#

just like a normal dashboard, like, the bots prefix, logs channel etc

golden condor
#

Guilds, users

digital ibex
#

ok, thank

golden condor
#

And your database

digital ibex
#

quick question

#

would i need a database for my bot and one for the dashboard?

#

so 2 dbs with the same info?

#

wouldn't that be like

#

bad? if i have to anyways

cinder patio
#

they can share a database

#

and should

digital ibex
#

how would i do that?

#

if they're in separate folders

cinder patio
#

both the bot and the server would connect to the database server?

digital ibex
#

yeah

#

cuz like a prefix command, u can do it via command or the dashboard

cinder patio
#

yeah, connect both the server and the bot to the database server

#

you could use Redis for caching

digital ibex
#

o ok

cinder patio
#

If you are using a local file with SQLite you can just point to the database file for both

digital ibex
#

do i need to host my db or something?

golden condor
#

Is it on the same computer?

digital ibex
#

yeah

golden condor
#

Then no

digital ibex
#

oh, ok

earnest phoenix
#

why even if a use a custom emoji betwen "" i still got :diamond: and not the emoji ?

honest perch
#

the bot must be in that server

earnest phoenix
#

it is

quartz kindle
#

is the custom emoji from your server? or is it a custom emoji from a different server?

earnest phoenix
#

is from a different server but the bot is in it

quartz kindle
#

does the bot have EXTERNAL EMOJIS permission?

earnest phoenix
#

yes, it has admin permissions

quartz kindle
#

try using a custom emoji from your own server

earnest phoenix
#

uhm, ok

#

Still don't work

mossy vine
#

how are you sending the emoji

earnest phoenix
#

i'm doing an userinfo command i want to have a custom emoji and i have this ```js
.addField("πŸ““ :diamond: Status", ${status[target.presence.status]}, inline, true)

#

in code emoji is like this

golden condor
#

Taht should work

#

Are you sure it is like that in the code?

earnest phoenix
#

yes

quartz kindle
#

where do you use that emoji code?

cinder patio
#

In the field title

earnest phoenix
#

wdym

cinder patio
#

I don't think custom emojis work there

#

maybe they do

earnest phoenix
#

it don't work either in description

cinder patio
#

try getting the emoji from the cache

earnest phoenix
#

i tried

cinder patio
#

Though that should work...

earnest phoenix
#

it returns undefined

quartz kindle
#

you said in the code your emoji looks like that, but in your add field you have "πŸ““ :diamond: Status" not the emoji code you showed after

opaque seal
pale vessel
#

yes

opaque seal
#

thanks

earnest phoenix
#

when i copy paste an emoji reverts to this @quartz kindle

quartz kindle
#

even in code blocks?

#

weird

#

it works for me tho

earnest phoenix
#
<a:diamond~1:707248274498781355>
#

oh nice

#

now it works

#

=))

#

@quartz kindle help

#

target.user.presence.activities.name is says undefiened

#

target.user.presence.activities is says vscode

pale vessel
#

user.presence.activities returns an array of activities

golden condor
#

Thats rich presence

earnest phoenix
#

@pale vessel OH

limber flume
#

is it possible to buy my bot nitro

#

so he can have gif pfp

slender thistle
#

Nope

shy turret
earnest phoenix
#

wait

#

bot can send GIF ?

golden condor
#

Yes

earnest phoenix
#

why not@earnest phoenix

#

wut ?

copper cradle
#

bots have every nitro perk

#

well

#

they can't have an animated pfp

white anvil
#

@copper cradle lol they have every nitro perk except all of them, except animated and global emotes

copper cradle
#

lmao

#

and you can't change their discrim

#

nor can they upload bigger images

white anvil
#

yes the only perk they have is emotes

copper cradle
#

well

pale vessel
#

well?

summer torrent
#

what is >>

magic jackal
#

Sign-propagating right shift a >> b Shifts a in binary representation b (< 32) bits to the right, discarding bits shifted off.

earnest phoenix
#

with what permissions (permissions of the member we are trying to kick) do you have to be so the bot cannot kick you

magic jackal
#

If the bot has kick permissions, and the bot role is higher up in the list than your role that you have. you can be kicked

earnest phoenix
#

well it is, and it does have the kick perms but the role below has the administrator perms

#

is

#

that the thing that doesnt let me?

#

and how would i make the bot to check if the person i am mentioning has the administrator permission

magic jackal
#

Administrator is all perms.

earnest phoenix
#

i know, the bot and the role below it has the administrator, and then the bot cannot kick it

magic jackal
#

If you wanna check perms you can use this for the message sender.

message.member.roles.cache.map(role => role.toString())```

or this for someone specific

```js
message.guild.members.cache.get(message.mentions.users.first().id).roles.cache.map(role => role.toString())```
pale vessel
#

doesn't get only accept snowflake?

#

so message.mentions.users.first().id

magic jackal
#

oh I forgot, yea

prime glacier
#

in js

cinder patio
#

by getting your server count and updating your bot's presence

prime glacier
#

how can i do server count?!

cinder patio
#

If you are using discord.js v12 it would be something <Client>.guilds.cache.size

#

But if your bot is sharded then it would just display the guilds the shard is handling

prime glacier
#

hm ok

#

thanks

red terrace
#

I've recently gotten to 75+ servers. However, when I try to fill in and send my application it says that it was "inorganically grown". What does this even mean? I've contacted Discord support and no reply yet.
However one thing I did notice was that my bot jumped from 30 servers to 75 in a matter of days

#

Has someone, perhaps, hoarded my bot?

cinder patio
#

I think it means that you got those servers unfairly, like creating a bunch of servers and inviting your bot to them

red terrace
#

I genuinely don't know where that's coming from though. I know stuff like that wouldn't work.
Will hop in there and ask.

#

Thank you.

#

I see that they have a FAQ in there so that's really helpful. Thanks!

earnest phoenix
cinder patio
#

because bot.channels.cache.get is a function

#

and this is what happens when a function is added with a string

earnest phoenix
#

Oh

#

But bot.users.cache.get is not a function aswel ?

cinder patio
#

it is

earnest phoenix
#

hello

digital ibex
#

hi, i have two models for a member. one for my dashboard and one for the actual bot itself. and when i try to use the same model for both dashboard and bot, it doesn't let me authorize my account, i get can't access users guilds

#

mongoosejs

earnest phoenix
#

hello can anyone help me with python bot script?

#

i will show it to you when you accept

#

it just wont work

cinder patio
#

you are probably using .size not .get

earnest phoenix
#

oh yes

#

my python script just wont work. no wrong

#

no errors

#

commands didnt work

rigid maple
#

How do I add aliases to my music bot?

#

v12

#

aliases: ['y'] I'm doing it as

#

pls help

earnest phoenix
#

what?

#

what do you mean?

#

explain ?

vernal rivet
#

@rigid maple it really depends on how you structure stuff. But the best way is to use the include method to search for the command under that aliases

warm marsh
#

Just store the aliases same way as you do the commands.

vernal rivet
#

Wait, no I am wrong. Include is a string method, you would use the find method

warm marsh
#

includes

#

Is the array method.

#

If you're talking about JS.

vernal rivet
#

It's also a string method

warm marsh
#

Yeah.

vernal rivet
#

That's why I got confused, cause I forgot that it's an array and string method.

warm marsh
#

But that's not the best way for checking for aliases.

vernal rivet
#

I use the find method for mine

warm marsh
#

oof.

vernal rivet
#

Oofers indeed

tired nimbus
#

How can I remove an object from an array

#

would setting the object to null remove it?

warm marsh
#

I do something like

for (const file of files) {
  const required = require(file);
  const parsed = path.parse(file);
  client.commands.set(parsed.name.toLowerCase(), required);
  if (Array.isArray(required.aliases) && required.aliases.length > 0) {
    for (const alias of required.alises) client.commands.set(alias.toLowerCase(), required);
 }
}```
#

No?

#

array = array.filter(data = data != search);

tired nimbus
#

due to JS garbage collector?

vernal rivet
#

Oofers mine is completely different

warm marsh
#

That's how command I do command loading.

vernal rivet
#

Oofers

warm marsh
#

Saves some time later.

#

As can just check if alias is in the map.

cinder patio
#

Kings, you should use the splice method

warm marsh
#

Splice would also work.

vernal rivet
#

Also you can remove an object from an array by using multiple array methods, depends on where it is located

warm marsh
#

Slice also.

vernal rivet
#

Yee

tired nimbus
#

but would setting it to null work?

#

due to the JS garbage collector?

warm marsh
#

Setting the object to null?

tired nimbus
#

yes

warm marsh
#

Inside the object.

#

It will still be there.

tired nimbus
#

the whole object to null

warm marsh
#

array[index] = null;

cinder patio
#

It won't

warm marsh
#

That won't change what's stored in the array.

cinder patio
#

it still counts as an element in the array

tired nimbus
#

then what does the garbage collector do

cinder patio
#

Remove unused variables

#

or ones that have already been used and are no longer needed

warm marsh
#

JS could do with pointers.

vernal rivet
#

I mean J's arrays don't care about what type it is, as long the object exist in the array

tired nimbus
#

ok so it can only delete an object if the object is from a variable?

cinder patio
#

no, that's not how references work

tired nimbus
#

var x = {"y","x"};
x = null

cinder patio
#
let obj = {};
const array = [];
array.push(obj);
delete obj;
console.log(array[0]) // {}
vernal rivet
#

^^^^

cinder patio
#

Objects are passed by reference, so if you add an object to an array, that object gets referenced in the array

#

obj is simply another reference

#

If you remove the object from the array, obj will still be {}

vernal rivet
#

If you want to fully delete the obj object, you have to destroy the obj.

tired nimbus
#

so If I have for loop I can say

for(let x = 0;x < x.length; x++)
array.splice(x, 1)

vernal rivet
#

I mean if you want to remove everything from an array, you can just do array.splice(0, array.length); that will remove everything

tired nimbus
#

yea I was going to add another if statement in the loop

vernal rivet
#

Yee

warm marsh
#

Or array = [];

vernal rivet
#

^^^^

#

Can make it be a new instance of an array

abstract glacier
#

@slow canyon

#

r!help

vernal rivet
#

Not in here

abstract glacier
#

@warped eagle

#

where

vernal rivet
digital ibex
#

hi, i have two models for a member. one for my dashboard and one for the actual bot itself. and when i try to use the same model for both dashboard and bot, it doesn't let me authorize my account, i get can't access users guilds

#

js

green kestrel
#

anyone here mind offering some feedback on my bot's page design?

pale vessel
#

sure

green kestrel
#

i based it off the design i used on the sporks pages, as i know they work well

earnest phoenix
#

guys

green kestrel
#

i havent finished with the dashboard yet, so nothing to show there

earnest phoenix
#

does anyone here do python

#

does anyone here do python

#

i have a question

pale vessel
#

looks nice. is it responsive?

earnest phoenix
#

on my bot

green kestrel
#

yup, completely responsive

earnest phoenix
#

hello

green kestrel
#

i havent got the responsive side of it working right with the score tables atm though

pale vessel
#

the padding is a little off for the title

green kestrel
#

not had time to look and see whats up with them

#

ah, thanks πŸ™‚

earnest phoenix
#

nvm

green kestrel
#

just ask, Aspect :)

earnest phoenix
#

okay

#

i have a question

lyric mountain
#

which is....

#

tumbleweed

earnest phoenix
#

um

#

lemme take a screenshot

#

here

#

no errors just wont run

pale vessel
#

didn't know that was a thing in glitch

earnest phoenix
#

it's only a test bot

pale vessel
#

also, nice token

earnest phoenix
#

thanks

#

try to hack

#

you get nothing

pale vessel
#

why is there two

earnest phoenix
#

um

#

no one in the end?>

pale vessel
#

nope

earnest phoenix
#

do i not need one in the end?

raw stirrup
#

You need only one

#

Not 2

pale vessel
#

one yes

#

keep the last one

earnest phoenix
#

it still wont run

#

help me.................

lyric mountain
#

code plz

earnest phoenix
pale vessel
#

you already have like 3 people helping you

earnest phoenix
#

just fyi, this is only a test bot so dont try to hack me

#

sorry

#

i should be gratful

pale vessel
#

nono

#

it's fine

earnest phoenix
#

i dont see any problems

#

im so fraustrated

#

i did this for 3 days

pale vessel
#

does glitch actually support python?

earnest phoenix
#

i dont think so

#

what do you mean by that?

pale vessel
#

then why are you using python in glitch

earnest phoenix
#

??

#

it does

#

supoort

#

i can write

#

some codes

#

work

pale vessel
earnest phoenix
#

also, only 1 code work

#

the rest dont

#

look

lyric mountain
#

that code is somewhat confuse

earnest phoenix
#

?

lyric mountain
#

also, refresh that token asap

earnest phoenix
#

confuse to the computer.......?

wet iron
#

can someone help me?

earnest phoenix
#

doesnt work

#

at all

wet iron
#

w8

#

what is the problem?

#

and which programming language did you code the bot in

#

?

lyric mountain
#

python

wet iron
#

Im too lazy to read

#

ok

#

and the problem?

lyric mountain
wet iron
#

his code

earnest phoenix
#

rest cant work!!

#

i have ben stuck doinf this for 3 days

wet iron
#

bruh

earnest phoenix
#

3 WHOLE DAYS

#

testing different codes...

limber flume
wet iron
#

put client.run below all code

#

and change your token

limber flume
earnest phoenix
#

i did

#

.py

limber flume
#

ok

earnest phoenix
#

client.run?

limber flume
#

have u got a on_message event

earnest phoenix
#

below all codes?

wet iron
#

his code

lyric mountain
#

ah, forgot that in python you gotta define all methods before the actual code

limber flume
#

yep

#

all u need to do

#

is

#

hold up

earnest phoenix
#

client.run()?

#

or client.run

modest maple
#

move run to the bottom of the code

#

and bruh its a function

limber flume
#

await bot.process_commands(message)

wet iron
#

see that client.run('TOKEN')

modest maple
#

atleast learn the basics of python before doing discord.py

limber flume
#

put that in your on_message event

modest maple
#

and yes its a nice token leak

wet iron
#

he is a beginner

limber flume
#

client.run()?
@earnest phoenix await bot.process_commands(message)

earnest phoenix
#

what?

wet iron
#

he is a beginner

limber flume
#

put that in on_message event

wet iron
#

he uses on @client.command()

#

that is how i learned

limber flume
#

all your commands should work

#

after u do that

modest maple
#

no?

earnest phoenix
#

wait put what in what?

modest maple
#

lmao

#

His commands wont work till it can load

#

xD

limber flume
#

await client.process_commands(message)

earnest phoenix
#

where?

limber flume
#

in the bottom of on_message

earnest phoenix
#

ok

limber flume
#

under

#

yes

earnest phoenix
#

alright

limber flume
#

lmk if works :)

modest maple
#

I would highly suggest learning python before doing this

#

Cuz it wont work

limber flume
#

lol

#

hes new

#

chill

wet iron
#

Can someone help me now?

earnest phoenix
#

okay

modest maple
#

Aslong as client.run() is still above those commands

limber flume
#

Can someone help me now?
@wet iron what u need

modest maple
#

they will never work

earnest phoenix
#

i learned python

knotty steeple
#

is that py on glitch

limber flume
#

yes u need it above

modest maple
#

@earnest phoenix clearly not

limber flume
#

i learned python
@earnest phoenix you need client run

#

lol

modest maple
#

@limber flume πŸ€”

earnest phoenix
#

still wrong!

modest maple
#

is that py on glitch
It pains me but yes

limber flume
#

LOL

#

ok

modest maple
#

cuz you dont know the basics

earnest phoenix
#

i do

limber flume
#

does it work aspect

modest maple
#

you dont

earnest phoenix
#

i know the basic

#

no

limber flume
#

all ur commands

earnest phoenix
#

there's errors

#

look

#

error

limber flume
#

fix them

modest maple
#

you litterally

limber flume
#

show me error

modest maple
#

you litterally have a indentation issue

earnest phoenix
#

ohhh

#

ohhh

#

ohhh

#

ohh

modest maple
#

and cant read an error

earnest phoenix
#

ohh

#

indentation

limber flume
#

BRUH

modest maple
#

secondly

limber flume
#

ok

#

backspace it

#

until it hits

modest maple
#

YOU STILL HAVE CLIENT.RUN() ABOVE THE COMMANDS

limber flume
#

the end of above code

wet iron
#

@wet iron what u need
@limber flume I made a shop in discord.js like with economy but it wont work

limber flume
#

then press enter

wet iron
#

it will show up

earnest phoenix
#

ok

wet iron
#

but the buy function wont work

earnest phoenix
#

what?

limber flume
#

@limber flume I made a shop in discord.js like with economy but it wont work
@wet iron whats error im mainly py but i can try to help

earnest phoenix
#

japanese girl what?

limber flume
#

send me the code

earnest phoenix
#

client.run?

wet iron
#

im in discord.js

limber flume
#

ill fix it god damn

wet iron
#

w8

#

i think i got this

#

lemme check something

limber flume
#

send me the code aspect

lyric mountain
#

one does not simply indent with spaces in python

earnest phoenix
#

???

wet iron
#

if it wont work

#

imma come back

earnest phoenix
#

i dont

#

indent with spaceds

limber flume
#

aspect

earnest phoenix
#

wtf

limber flume
#

send me code

earnest phoenix
#

okay

limber flume
#

ill fix itr

earnest phoenix
#

import discord
import os
import keep_alive
from discord.ext import commands

###ENVIRONMENT###

TOKEN = os.getenv("TOKEN")
APIKEY = os.getenv("APIkey")
SECRET = os.getenv("ClientSecret")
ID = os.getenv("ClientID")

###ENVIRONMENT###

client = commands.Bot(command_prefix = '!')
Clientdiscord = discord.Client()

@client.event
async def on_ready():
print("I'm in")

@client.event
async def on_message(message):
print(str(message.author.display_name)+" "+message.content)
if message.author == client.user:
return
if message.content.startswith("!HiZombia"):
await message.channel.send("Hello! I am the official bot of Zombia.io Discord Server! ") # startswith returns true if the string its called on startswith something

await client.process_commands(message)

client.run('NzE3MTA4MjA0NDMzMDQ3NTc0.XtkwDA.fg_c9beMdCRUOdGz5T9DhobinTk')

@client.command()
@commands.has_permissions(kick_members=True)
async def kick(ctx, member : discord.Member, *, reason=None):
await member.kick(reason=reason)
await ctx.send(f'User {member} has been kicked!')

@client.command()
@commands.has_permission(mute_members=True)
async def mute(ctx, self, member : discord.Member, *, reason=None):
await member.mute(reason=reason)
await ctx.send(f'User {member} has been muted!')

@client.command()
@commands.has_permissions(ban_members=True)
async def ban(ctx, self, anything: discord.Member, *, reason=None):
await member.ban(reason=reason)
await ctx.send(f'User {anything} has vanished!')

limber flume
#
code here
digital ibex
#

bruh

limber flume
#

bruh

#

do this

#

pls

#

@earnest phoenix

earnest phoenix
#

wtf.

limber flume
#

not

#

privat3

#

lOL

wet iron
#

yep

#

the token is posted boi

limber flume
#

he

#

sent

quartz kindle
#

lmao

limber flume
#

token

wet iron
#

right here

#

lmao

limber flume
#

OMG

#

BRUH

wet iron
#

he leaked the whole code

earnest phoenix
#

yeah

wet iron
#

even the token

earnest phoenix
#

i keep

#

regenarating

#

the code is from YT

wet iron
#

okay

earnest phoenix
#

regenerating

#

just wont work

wet iron
#

u will learn it eventualy

lyric mountain
wet iron
#

Im dumb af even now

#

xD

lyric mountain
#

why don't you start with a very simple code and put more things as you develop your skills?

earnest phoenix
#

im 5 weeks python

lyric mountain
#

like, there's no shame in starting with a Ping command or a "Hello World" string

earnest phoenix
#

i knowww

#

but

limber flume
#

tere

#

there

earnest phoenix
#

thank you so much

modest maple
#

dont spoon feed code smfh

limber flume
#

np

earnest phoenix
#

what is ur xperiences

limber flume
#

what

earnest phoenix
#

japanese girl

#

i learn

proven lantern
limber flume
#

erm

#

it loks fine

#

maybie

#

inline it

lyric mountain
modest maple
#

yeah

#

whitespace

#

dick the fucking embed names

#

they look shit now

limber flume
#

lOl

quartz kindle
#

field titles are bad for commands

wet iron
#

now my code crashes

quartz kindle
#

because they're too "invisible"

limber flume
#

now my code crashes
@wet iron eoor?

modest maple
#

They should of kept the old Field name colours

limber flume
#

error*

modest maple
#

but kept the value colors they have now

wet iron
#

im trying to give the sender a role

limber flume
#

rr?

wet iron
#

for example if they type .buy 'role' they get a role

quartz kindle
#

i like the current embed, it gives more emphasis to the field content rather than the title

wet iron
#

so

modest maple
limber flume
#

oh

#

nice

modest maple
#

I like the high contrast

#

just not the embed field names

quartz kindle
#

so it looks like your content is correctly separated into sections, but doesnt overload it with bright and strong titles

earnest phoenix
#

hello

limber flume
#

yo

#

works?

earnest phoenix
#

no

#

i cant copy

#

it

limber flume
#

bruh

earnest phoenix
#

i dont see my problems

limber flume
#

oml

earnest phoenix
#

can you please explain.

#

one more time

limber flume
#

just copy paste

earnest phoenix
#

i cant

modest maple
#

πŸ‘ Dont πŸ‘ Spoon πŸ‘ feed πŸ‘

earnest phoenix
#

SHUT Up

#

I LEARN

lyric mountain
#

dude

knotty steeple
#

ur problems is that u dont know python

lyric mountain
#

you'll not learn fishing by being given a fish

limber flume
#

bro

lyric mountain
#

same with programming

limber flume
#

chill

#

i willl help u

#

just show me the error

modest maple
#

You clearly No learn

#

you dont learn by copy pasting code

wet iron
#

yea

earnest phoenix
#

dude

#

i know

#

i learn

modest maple
#

and SPOONFEEDING CODE πŸ‘€ Is NOT the way to help

knotty steeple
#

i do /s

limber flume
#

i will show u how

#

to fix indent

earnest phoenix
#

okay

#

indentations?

wet iron
#

and SPOONFEEDING CODE πŸ‘€ Is NOT the way to help
@modest maple 100% agree

earnest phoenix
#

can you explain which line?

modest maple
#

nor is jumping to discord.py WHICH IS RENOUND FOR BEING NON-BEGINNER

proven lantern
#

@quartz kindle @modest maple thanks, i'll try messing around with it some more

modest maple
#

You seem to have 0 idea of the following:

OOP
PEP 8
Functions
INDENTATION
ASYNC AND AWAIT
and more...

#

basically everything discord.py requires you to know

lyric mountain
#

I think the biggest issue here is not admitting that he's a beginner

knotty steeple
#

wait whats pep

earnest phoenix
#

i am yeah i am

lyric mountain
#

so accept our help dude

modest maple
#

If he isnt a beginner that makes me a god of Python

lyric mountain
#

you WILL come back here N more times

earnest phoenix
#

copy

limber flume
modest maple
#

NO COPY

lyric mountain
#

because making bots does not resume to "making a working bot"

limber flume
#

wait

lyric mountain
#

because there's no 100% bug-free code

quartz kindle
#

activate windows

limber flume
#

here video

#

on how to fix ur code

lyric mountain
#

what will you do when you need to fix your code?

limber flume
#

lOL

#

@earnest phoenix

lyric mountain
#

will you ask sean again?

limber flume
#

seee if i video and he dont see it

modest maple
#

bruh no offence

#

but a word of warning

limber flume
#

y

modest maple
#

we WILL bully you if you continue to Spoon feed code

limber flume
#

y

modest maple
#

Especially without given any prior info

knotty steeple
#

i will definitely

lyric mountain
#

and he WILL bother you with N issues

limber flume
#

ight lol

#

:Z

proven lantern
#

i got bullied for spoon feeding code

limber flume
#

im just tryna help

modest maple
#

and showing that you damn well dont have a good knowledge of python aswell

limber flume
#

yk

lyric mountain
#

you can only spoonfeed if you're spoonfeeding yourself

#

no exceptions

earnest phoenix
#

fine fine

#

i have good python knowledge

limber flume
earnest phoenix
#

test me after i fix code

limber flume
#

bro

knotty steeple
limber flume
#

i made a videp at least watch ot

#

it*

lyric mountain
#

wait, are you accepting that we test you about python knowledge?

limber flume
#

lOL

#

he shouldnt have said

wet iron
#

can someone help me

modest maple
#

i have good python knowledge
I am now the god of python

#

πŸŽ‰

wet iron
#

how do I add a role to the sender?

lyric mountain
#

I am now the god of python
@modest maple "test me after i fix code"

earnest phoenix
#

yes

#

yes

#

cmon

#

test me

lyric mountain
#

how do I add a role to the sender?
@wet iron language?

wet iron
#

i tried sender.addRole(role) but nope

#

javascript

lyric mountain
#

that's about it, maybe the issue is somewhere else

modest maple
lyric mountain
#

do you get any error?

modest maple
#

Its pretty simple being 12 lines

earnest phoenix
#

wait

knotty steeple
#

what exactly is sender

earnest phoenix
#

i mean

#

python know

knotty steeple
#

a member or a user

modest maple
#

thats not even advanced shit

lyric mountain
#

d.py is not a language itself

wet iron
#

sender.addRole is not a function

knotty steeple
lyric mountain
#

sender.addRole is not a function
@wet iron show the bit where you're defining "sender"

wet iron
#

msg.author

knotty steeple
#

thats not a member

lyric mountain
#

that's the issue

#

you gotta do msg.member

modest maple
#

thats a user object

wet iron
#

oh

#

ok

#

thanks

modest maple
#

Member != User

limber flume
#

@earnest phoenix is your code working

modest maple
#

@earnest phoenix Work it out yet?

#

:P

limber flume
#

lol

wet iron
#

i tried now msg.member.addRole(role)

#

nope

#

doesnt work

limber flume
#

define role

wet iron
#

Fricc

#

define role
@limber flume Bruh I did

limber flume
#

o

#

maybie let role = "ID"

modest maple
#

is msg.member even a thing in d.js

limber flume
#

im not discord.js

earnest phoenix
#

bruh

limber flume
#

i know a little

earnest phoenix
#

wait

#

lemme

limber flume
#

:|

earnest phoenix
#

look at mistakes

modest maple
#

lol

limber flume
#

bruh

wet iron
#

:/

limber flume
#

him

knotty steeple
#

whats the error now

lyric mountain
#

@earnest phoenix What does this bit of code do
@modest maple is that a broadcasting function?

earnest phoenix
#

check it out

#

indentation