#development

1 messages · Page 1409 of 1

old latch
#

but they are banned from there

#

that's the problem

safe creek
#

what is your fleshy sheilds numerical value @zealous helm

earnest phoenix
#

well that's a shame

#

seems like a them problem

pale vessel
#

¯_(ツ)_/¯

safe creek
#

what is your fleshy sheilds numerical value @zealous helm

#

i edited in the mention

old latch
#

they vanished

safe creek
#

its not a spam

#

oh

#

lol

old latch
#

well

#

that's what I think they did

safe creek
#

nah just a load of bot declines

#

no ban cover up i mean what

zealous helm
#

I'm trying to figure a way to delete things, looking

safe creek
#

delete what?

old latch
#

I really suggest you to get away from bdfd honestly and work with a proper discord library instead

safe creek
#

the rude words youve said to people? @zealous helm

earnest phoenix
#

is bdfd even allowed

old latch
#

allowed where?

earnest phoenix
pure lion
#

Define bdfd

earnest phoenix
#

bot designer for discord

safe creek
#

probably not

pure lion
#

Oh

earnest phoenix
#

the phone app

pure lion
#

You have to alter the client

earnest phoenix
#

that many people use

pure lion
#

It can't be a direct copy

pale vessel
#

Bad Dice Freaking Dice

pure lion
#

I'm not in the mood flazepe

pale vessel
#

How unfortunate

earnest phoenix
#

rip

agile lance
gritty sinew
#

Is there an easier way of making it so only someone with administrator privileges can use a command

hollow sedge
#

yes

pale vessel
#

Define easier way?

hollow sedge
#

Let me show you how it's done in google drawings

agile lance
earnest phoenix
#

How to install package
With key i don't remember

gritty sinew
#

I searched up how to do it and it came up as like a page of code and I dont want restrictive ones to be that long

earnest phoenix
#

like pnpm

agile lance
#

example: if(!message.member.hasPermission("permission")) return;

gritty sinew
agile lance
hollow sedge
#

Or the @bot.has_permissions(Administrator=True)

#

if you're on py

agile lance
#

.^

slender thistle
#

Something tells me it isn't capitalized

hollow sedge
#

Idk something like that

agile lance
#

lol

gritty sinew
#

I want to make sure the person who's using the code has admin my bot needs admin to join servers

slender thistle
#

Also

#

why does your bot need admin

gritty sinew
#

Oh

agile lance
#

if you have any features that doesnt require admin

#

Certain feature can require admin

slender thistle
#

No features require the bot to have admin

agile lance
#

But if the bot HAS to have admin, I believe it cant be on top.gg

slender thistle
#

Correct

gritty sinew
#

I thought kicking and banning required the bot to have admin

agile lance
#

No.

#

they have a permission fr those

#

for*

round steeple
#

it requires "kick and ban" permissions

gritty sinew
#

Ok

agile lance
#

KICK_MEMBERS and BAN_MEMBERS

gritty sinew
#

Am I able to change that then

agile lance
#

Did you already upload your bot?

#

I believe if you click “Edit” you can change those type things.

gritty sinew
#

Cause I'm making a multimedia bot so I was thinking admin would make it the easiest

agile lance
#

No.

hollow sedge
#

just click "Edit" and change the invite link to the one without the permission

agile lance
#

in that case it will need ATTACH_FILES and SEND_MESSAGES

#

and EMBED_LINKS in some cases

gritty sinew
#

Cause these are the base commands I was thinking about without economy etc.

#

*DO NOT ADD <> WHEN DOING THE COMMANDS THAT JUST SHOWS THAT ITS ANOTHER ARGUMENT/PART OF THE COMMAND

=====Test Commandstest_tube=====

----------Ping----------
H!ping

Makes the bot respond with pong used to test bot and see if there working properly.

Required:Everyone

----------Beep----------
H!beep

Makes the bot respond with boop used to test bot and see if they are working properly

Required:Everyone

=====Server and Moderationelectric_plug=====

----------Server-----------
H!server

Tells you the servers name,ID,when it was created and what its main region is.

Required:Everyone

----------Warn----------
H!warn <@user>

Warns tagged user

Required:Administrator

----------Mute----------
H!mute <@user> <time>

Mutes tagged user for specified amount of time.

Required:Administrator

----------Softban----------
H!ban <@user>

It bans the tagged user

Required:Administrator

----------Autorole----------
H!autorole <role>

When you set this up it automatically gives the role to every member intill the role is deleted

Required:Administrator

=====Broadcasting & Polls=====

----------Broadcast----------
H!broadcast <chat> <text>

Broadcasts to any chat room

Required:Administrator

----------Poll----------
H!poll <chat> <title> <question> (repeat the question part as many times as you want questions)

Puts a poll into the chatroom selected

Required:Administrator

=====Profile and User Managment=====

----------Open Profile----------
H!myprofile

This command opens the persons profile

Required:Everyone

----------Inspect Profile----------
H!inspect <@user>

Opens tagged users profile.

Required:Everyone

=====Music=====

----------Play----------
H!play <music video name>

Adds song to current queue

Required:Everyone

----------Add To Idle----------
H!idleplay

Puts up a poll voting on whether to add a song to a playlist that plays when no songs are chosen.

Required:Everyone

#

Is that too much for one bot

#

Because that doesnt even include economy fun games etc.

devout mortar
#

ca correspond a quoi ?

earnest phoenix
#

Look at my code

#

Not finished but working

old latch
#

did you just really put your token there?

gritty sinew
#

Looks good

old latch
#

!!!

earnest phoenix
#

I forget

old latch
rustic nova
gritty sinew
#

Should I change it since I shared the link

rustic nova
#

very smart3

old latch
#

go to your app application

#

and change the bot's token there

#

@earnest phoenix

rustic nova
#

I'm losing braincells each time someone screws up with their bot token ExcitedButSadPepe

solemn latch
#

Happens so often.

earnest phoenix
old latch
#

good

gritty sinew
#

So is it in the link

old latch
#

you really have to check that you don't post your token!

earnest phoenix
#

i forget

gritty sinew
#

Is there a way of getting a link without showing the token

old latch
#

yess that's why I'm telling you :)

#

be more careful

earnest phoenix
#

k

gritty sinew
#

Cause I shared the link in some off my friends servers

old latch
#

what do you mean?

gritty sinew
#

I shared the link and the link includes the token so I was wondering if I could get one without the token

old latch
#

what link sorry I dont get it

gritty sinew
#

Wait nvm

#

That's a different code

old latch
#

ah

#

anyways if you change the token on the discord website the old one gets invalid

flat pelican
#

is everything okay in here

old latch
#

yes yes

#

they changed the token :)

flat pelican
#

ookies

gritty sinew
old latch
#

for what?

safe creek
gritty sinew
#

Wait nvm I dont need invite

#

For my bot to need to join a server

safe creek
#

you do

gritty sinew
#

I have to many?

safe creek
#

it needs an invite link for youre bot to join servers

old latch
#

yes

pale vessel
#

are you sure you defined your bot as client

safe creek
#

yes

old latch
#

but the bot doesnt require "create instant invite"

pale vessel
#

where

safe creek
#

everything starts ith @client even the run

gritty sinew
#

Ik but that perm is tk make invites in the server they join

old latch
#

well if you need that

safe creek
#

it just says or feels like its just saying fuck you atm

safe creek
gritty sinew
#

I guess it doesn't need that

safe creek
#

not unless it raids or deletes servers lol which is against tos btw

gritty sinew
#

I wasnt thinking I still thought that was around the lines of roles and channel reordering etc

old latch
#

if that's what you need then yes

#

do you need tts messages

#

and mention everyone?

rustic nova
#

only give permissions your bot truly needs

old latch
#

and priority speaker?

rustic nova
#

remember the bot gets invited with sendmessage only

gritty sinew
#

Mention everyone is for announcements but I dont need tts I can get rid of it I need priority speaker for the music commands

old latch
#

ahh

#

manage webhooks?

gritty sinew
#

Wouldent that be for making profiles like mme6

old latch
#

uh?

#

what exactly do you mean?

gritty sinew
#

Making profile cards

#

For users

old latch
#

I don't think you need webhooks for that, or atleast I don't see any reason why you need it...

devout mortar
#

questions?

gritty sinew
#

Anything else that seems unnecessary

devout mortar
#

how do you put the music commands easily?

old latch
gritty sinew
#

Ok

old latch
devout mortar
#

How do we create music commands?

old latch
#

oh

#

what library?

hollow sedge
gritty sinew
#

And I have one more question to ask after you guys figure that one out

devout mortar
#

bah offer me a librairy with which we can make the music commands easily

hollow sedge
#

You can use lavalink

hollow sedge
#

I'm not sure about easily

gritty sinew
#

How do I make it so they need to accept the perms when they invite the bot

devout mortar
#

bon.
proposez moi une librairy avec laquelle ont peux faire les commabdes musique plus facilement ?

hollow sedge
#

you shouldnt look for ease, you should look for the best
And the two go hand in hand

old latch
#

you can't do more about it

gritty sinew
#

Whenever I leave the bot page it gets rid of the perms

old latch
#

ohh you just need that for the link

gritty sinew
#

Where do j put my permissions interger

hollow sedge
#

Yeah just check all the permissions you need and copy the link

#

It automatically generates a link for you

gritty sinew
#

It keeps erasing when I switch to the link page

hollow sedge
#

Yes

#

The link is on the page

gritty sinew
#

Wait nvm

hollow sedge
#

Where you check the permissions

old latch
#

lol no

gritty sinew
#

I can change them on the link page too

old latch
#

that

gritty sinew
#

I was changing them on the bot page

hollow sedge
#

Oh

old latch
#

ah lol

safe creek
#

what ive always wanted when changing my prefix or trying Ignoring exception in on_message Traceback (most recent call last): File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\client.py", line 333, in _run_event await coro(*args, **kwargs) File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\ext\commands\bot.py", line 943, in on_message await self.process_commands(message) File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\ext\commands\bot.py", line 939, in process_commands ctx = await self.get_context(message) File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\ext\commands\bot.py", line 853, in get_context prefix = await self.get_prefix(message) File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\ext\commands\bot.py", line 798, in get_prefix ret = await discord.utils.maybe_coroutine(prefix, self, message) File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\utils.py", line 331, in maybe_coroutine value = f(*args, **kwargs) File "c:\Users\forth\OneDrive\Documents\kigles\botmain.py", line 12, in get_prefix return prefixes[str(message.guild.id)] KeyError: '778387194423410689'

hollow sedge
#

You shouldnt be storing them in a dict to begin with

old latch
#

bot id leaked?

safe creek
#

what

hollow sedge
#

Also @safe creek try it without the str conversion

old latch
#

or more like the guild id

safe creek
#

guild probably

old latch
#

ya

gritty sinew
#

I need to switch to pc my phones about to die

slender thistle
#

What what WHat WHAt whAt whaT watt

old latch
#

yes

slender thistle
#

Are you storing guild IDs in string in the first place

#

@safe creek

rustic nova
#

Guild ids are strings, no?

slender thistle
#

If yes, some guilds may not be included in the dictionary, so either use .get on the dictionary or catch the KeyError with a try-except

hollow sedge
safe creek
#

yes for the custom prefixes

hollow sedge
#

They're ints

slender thistle
rustic nova
#

Laughs in java long

pale vessel
#

Why aren't codeblocks in monospace on Android

slender thistle
#

I don't think I need it

safe creek
#

you usre?

slender thistle
#

Unless there's an unexplainable fuckery going on

safe creek
#

it coild help

#

im so cinfused

slender thistle
#

In which case I'll double-pray for you to all ~~non-~~existing Gods

#

I gave you the instructions

hollow sedge
#

Just try removing the str around message.guild.id @safe creek

safe creek
#

mmmk

#

so in every event?

hollow sedge
slender thistle
#

I'm sorry

safe creek
#

i see

hollow sedge
#

If you are entering it into the dict as an int, you can't get its value using a str

slender thistle
#

Where do you see them

#

add integers to prefixes

#

Ok

safe creek
#

the code is a mix of json and py if im correct

earnest phoenix
#
    throw err;
    ^
Error: Cannot find module 'discord.js'```
slender thistle
#

The code isn't exactly a mix of JSON and Python

earnest phoenix
#

js

slender thistle
#

It's Python and Python dictionaries

safe creek
#

hmmm

earnest phoenix
#

huh?

#

js bro

slender thistle
#

Was I talking to you

hollow sedge
#

That's because you read json into a dict

#

JSON isn't code though

earnest phoenix
#

what i so

hollow sedge
#

It's just a way of storing data

earnest phoenix
#

do*

slender thistle
#

It's literal fucking text with a special format

safe creek
#

do you just want to point out the stuff ive done wrong in the code?

slender thistle
#

That's all JSON is in files

slender thistle
#

And what's apparently wrong

safe creek
#

im just confused man im new to this shit

#

your fancy coder words confuse me

slender thistle
#

Iqpqpsofjbanalwosivuebe

#

Ok

hollow sedge
#

you should actually learn Python then

slender thistle
#

Ask Google what dict.get Python is

hollow sedge
#

If you don't know what a dictionary is

safe creek
#

mmmk

pale vessel
#

is dict.get() same as dict["property"]

slender thistle
#

almost

#

In terms of getting an existing value, yes

safe creek
#

Get() method for dictionaries in Python
In python dictionaries, following is a conventional method to access a value for a key. The get() method is used to avoid such situations. This method returns the value for the given key, if present in the dictionary

slender thistle
#

In terms of behavior when getting a non-existent key... it's different

gritty sinew
#

What's the best alternitive to if/else if

hollow sedge
#

Dicts @gritty sinew

pale vessel
#

I'm assuming one errors and the other doesn't...?

hollow sedge
#

basically the Python equivalent of a switch

solemn latch
#

Switch cases

slender thistle
#

I use .get whenever I'm unsure if a key actually exists in a dictionary because it simply returns None if a key wasn't found

#

Correct, flaze

gritty sinew
#

I use js

hollow sedge
#

OH

gritty sinew
#

Not python

slender thistle
#

.get returns None, getting key through [] errors

hollow sedge
#

Yeah I just realized lol

solemn latch
#

Switch cases are the alternative to if else in js

safe creek
#

ima redo it fuck it

slender thistle
#

Why

gritty sinew
#

Cause I have spaghetti code right now

slender thistle
#

You can just make your bot add the guild to dictionary if it doesn't exist

safe creek
#

im confused idk what to fucking do where to put what

hollow sedge
#

You can also set a default other than None right? Like getattr?

slender thistle
#

dict.get("MY NON EXISTENT KEY", "THE KEY DOES NOT EXIST")

#

No need to play with getattr

#

At least I don't see any reason to

hollow sedge
#

No I'm just saying it works similarly to getattr

slender thistle
#

Ah, then yeah

hollow sedge
#

Or rather it's use case is

slender thistle
#

True

safe creek
#

hold on lt me try removing then adding the bot

slender thistle
#

That works too

#

You could also just make the bot add a default prefix to your prefixes dictionary whenever one isn't found for a guild

safe creek
#

to the server

#

yeah it should show the guild id and prefix on join in an .json file when it joins the server and the n removes said info when left the server

earnest phoenix
#
  "name": "HAPPY",
  "version": "0.0.1a",
  "description": "happy bot",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node index.js"
  },
  "dependencies": {
    "canvas": "^2.2.0",
    "canvas-constructor": "^2.0.1",
    "child_process": "^1.0.2",
    "cpu-stat": "^2.0.1",
    "dbdapi.js": "^0.7.5-pre",
    "dblapi.js": "^2.4.0",
    "discord.js": "10.6.4",
    "discord.js-commando": "^0.10.0",
    "drdevapi.js": "^0.2.6",
    "express": "^4.17.1",
    "ffmpeg-binaries": "^4.0.0",
    "fs": "^0.0.2",
    "fs-extra": "^7.0.1",
    "mathjs": "^5.4.0",
    "moment": "^2.23.0",
    "moment-duration-format": "^2.2.2",
    "moment-timezone": "^0.5.23",
    "ms": "^2.1.1",
    "node-opus": "^0.3.3",
    "node-superfetch": "^0.1.9",
    "opusscript": "^0.0.6",
    "os": "^0.1.1",
    "parse-ms": "^2.0.0",
    "path": "^0.12.7",
    "platform": "^1.3.5",
    "quick.db": "^7.1.3",
    "quick.db-plus": "^0.1.3",
    "quick.hook": "^1.5.1",
    "request": "^2.87.0",
    "simple-youtube-api": "^5.1.1",
    "snekfetch": "^4.0.4",
    "superagent": "^4.0.0",
    "ytdl-core": "^4.0.2"
  },
  "engines": {
    "node": "12.x"
  },
  "repository": {
    "url": "https://glitch.com/edit/#!/sad"
  },
  "license": "MIT",
  "keywords": [
    "node",
    "glitch",
    "express",
    "HAPPY"
  ]
}
#

any wrong?

gritty sinew
#

does anyone know a better alternative to if else

pale vessel
#

ternary

chilly bison
solemn latch
#

Theres a few others aswell, such as dynamic stuff, which may or may not be applicable

old latch
#

is ternary better

earnest phoenix
#

How do i make top.gg see how much servers is bot in??

old latch
safe creek
#

thats new Ignoring exception in on_guild_join Traceback (most recent call last): File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\site-packages\discord\client.py", line 333, in _run_event await coro(*args, **kwargs) File "c:\Users\forth\OneDrive\Documents\kigles\botmain.py", line 47, in on_guild_join json.dump(prefixes, f, indent=4) File "C:\Users\forth\AppData\Local\Programs\Python\Python39-32\lib\json\__init__.py", line 180, in dump fp.write(chunk) io.UnsupportedOperation: not writable

old latch
earnest phoenix
#

okay

old latch
#

actually

#

it's the first pin

solemn latch
#

Tenary is better

#

Well, in cases it makes sense.

#

Tenary for a command handler KEKW

cinder patio
#

In terms of performance, usually if is faster than ternery - but the difference is very small. Use whichever you find more readable

#

There are also cases in which ternary just doesn't make sense

solemn latch
#

Isnt a tenary just an if else statement just formatted diffrent

old latch
#

yes...

#

but they look ugly

cinder patio
#

nope

old latch
#

oh

#

enlighten me

solemn latch
#

Damn people put a lot of effort in these things

safe creek
#

ayyyy i got it to work

old latch
#

nice!!

safe creek
#

in the join and remove it had the bottom thingy inside the dump as read and not write

old latch
gritty sinew
#

What's the best source for learning js

solemn latch
#

Oh I didn't even read it, I just read the conclusion

#

Lmao didn't notice it was java

safe creek
#

so it had 2 thingys as read and not write PepeKMS

old latch
#

xD

solemn latch
#

Pretty much the conclusion I'm seeing online is it doesn't make any performance difference that matters.

If it matters, then you shouldn't be using js anyway.

honest perch
#

how would i get user activities in djs?

pale vessel
#

user.presence.activities lol

honest perch
#

for me that just returns []

cinder patio
#

Member intents must be enabled

pale vessel
#

guild presences

honest perch
#

danke

drifting wedge
#

if i have a channel id, how can i see if the channel is in the guild? Discord.py please ping me

solemn latch
#

Did the solution not work yesterday

drifting wedge
#

it did

#

but i cant figure out how to check

#

if the channel exisits

solemn latch
#

You can loop over the list and check if its in there

drifting wedge
#

yesterday from wat i remember we got the channel from the #topgg-api

#

like the channel id

#

ye, but how can i get the list?

solemn latch
#

We did both

drifting wedge
#

the list is channel objects

solemn latch
#

Guild.channels

#

Yeah

drifting wedge
#

so i get the channel object

#

from the id?

#

i tried

solemn latch
#

You do the loop

drifting wedge
#
            if channel2 in ctx.guild.text_channels:```
#

for?

solemn latch
#

Then the object in the loop you check if its in there.

drifting wedge
#

for guild in ctx.guild.channel

#

but is it text_channels?

#

or just channels?

#

@solemn latch

solemn latch
#

You can just do
for guild in ctx.guild.channels
if guild.id = id

slender thistle
#

what the fuck

solemn latch
#

I'm trying shiv

drifting wedge
#

oh

solemn latch
slender thistle
#

No, like

drifting wedge
#

very smort

#

@solemn latch thanks as always

slender thistle
#

You can just guild.get_channel

#

Why the loop

drifting wedge
#

ye

#

umm

solemn latch
#

Then do that lol

slender thistle
#

or channel in guild.channels

drifting wedge
#

like an if

#

if the channel exisit in that server

slender thistle
#

If you got it from guild, then it's in guild's channels

drifting wedge
#
            if channel2 in ctx.guild.text_channels:```
slender thistle
#

Again

#

Pointless if

drifting wedge
#

no

slender thistle
#

Instead check if channel2 returns None

drifting wedge
#

i need to do an else

#

like if else

slender thistle
#

Instead check if channel2 returns None

drifting wedge
#

wait

#

brain melt time

slender thistle
#

Mother fuck me sideways

drifting wedge
#

ctx.guild.get_channel(channel id)

solemn latch
#

I like you as a non mod shiv lol

pale vessel
#

Ikr

drifting wedge
#

cock = ctx.guild.get_channel(channel id)

pale vessel
#

cock

drifting wedge
#

if cock == None:

slender thistle
#

is None

#

and yes

#

You got it

drifting wedge
#

ok

#

ty

#

shiv is super epic

#

omg 530 no scope

#

thanks shiv and woo

#

flaze didnt help :p

slender thistle
#

C'mon, don't do my man like that

drifting wedge
#

flaze is still epic

#

but he didnt help

slender thistle
#

True

solemn latch
#

I really need to spend a week or two learning python.

drifting wedge
#

ive made an entire bot + dashboard

#

only using python + html

slender thistle
#

Python is relatively helpful

drifting wedge
#

im learning js

slender thistle
#

Except when it's not

drifting wedge
#

its super similar to python

pale vessel
#

No it's not

drifting wedge
#

@slender thistle turning over to the dark side

drifting wedge
pale vessel
#

Other than it being interpreted

slender thistle
#

I spent 2 honest to god's fuck hours on a program that didn't even work

drifting wedge
#

like ive been understanding why shit is like how it is

slender thistle
#

and instead did it in Excel in 30 minutes

pale vessel
#

The syntax is completely different

drifting wedge
#

excel = bad google sheets

drifting wedge
pale vessel
#

Not completely but still

slender thistle
#

Excel is fun but VBA can vanish

pale vessel
#

It's noticable

drifting wedge
#

so far with print

#

and strings

#

thats similar lmao

pale vessel
#

indentation

slender thistle
#

They're sorta kinda similar

drifting wedge
#

oh

#

also vars

#

r super similar

#

but python's is easier

pale vessel
#

no constants in python iirc?

drifting wedge
#

a = "5"

slender thistle
#

JS has constants at least

#

Python ain't getting those

drifting wedge
#

is better than let a = "cock";

pale vessel
#

Wack

drifting wedge
#

whats constant useful for?

pale vessel
#

Use const if you're not going to modify it

drifting wedge
#

ye

#

but why?

slender thistle
#

We're aall about dynamic typing and being able to fuck our programs up because of our own stupidity

drifting wedge
#

preformance?

slender thistle
#

Reliability

pale vessel
#

and a good practice

slender thistle
#

If a constant number is needed, you don't want to change it

cinder patio
#

and readability

drifting wedge
#

well if u have shivisntepic = "pp"

#

just dont edit that

#

lmao

#

big brain timeee

pale vessel
#

I never used a single var in my code

slender thistle
#

In big projects it gets messy

drifting wedge
slender thistle
#

I have found myself accidentally editing object properties I wasn't supposed to touch in the first place after I created them

pale vessel
#

Learn TS xd

drifting wedge
#

would u guys say a bot in like 450 servers is "doing well"?

slender thistle
#

Which, I can say, fucked me over big time

#

Fuck TS, I'm going PHP

drifting wedge
#

TS is just js but with classes

#

and a cooler name

pale vessel
#

Types

slender thistle
#

If I'm gonna give up on myself, I'm doing it with style

pale vessel
#

Js has classes

slender thistle
#

TS is just a C# JS

drifting wedge
#

js is just a c+ js

cinder patio
#

and it's freaking awesome

slender thistle
#

But on a serious note, I do want to get a hang of TS

drifting wedge
#

NOOO

#

my tech support

#

going to the dark side

#

my GOOOOGLEEEE

slender thistle
#

I'm familiar with JS a bit so nothing would change

drifting wedge
#

o ok

pale vessel
#

Tim hates TS so you're good

slender thistle
#

😂

drifting wedge
#

so i wont need to start googlinf stuff

#

before asking

#

good

pale vessel
#

You still have your stack overflow

drifting wedge
#

nope

slender thistle
#

A friend of mine uses TS and he hates it

#

SO is... special

drifting wedge
#

shiv is my stackoverflow

#

and my google

pale vessel
#

kekw

drifting wedge
#

@drowsy crag

#

self bot

slender thistle
#

That's...

solemn latch
#

Yikes

drifting wedge
#

@earnest phoenix thanks!

slender thistle
#

Holy flying rocks

solemn latch
#

Nice lebelup @drifting wedge

pale vessel
#

Ayy, you got one oxygen bubble

#

Lucky

solemn latch
#

Gz boys

pale vessel
#

I want one too

slender thistle
#

Thanks I'm going to waste that oxygen bubble and suffocate myselfnto death

solemn latch
#

Soon

pale vessel
#

mood shiv

slender thistle
#

You can have it flaze

pale vessel
#

no I don't want to either

drifting wedge
#

gg

pale vessel
#

no

#

Fuck

drifting wedge
#

@pale vessel gg on level up

pale vessel
#

thanks

solemn latch
#

Hyp3

pale vessel
#

Don't want that oxygen either though

drifting wedge
#

can i use its help command here?

#

or should i not?

slender wagon
#

what's the best way to make a music bot with?

pale vessel
#

Code

solemn latch
#

Obvs testing channels

slender wagon
#

do u always have to use google api or whatever that is

slender wagon
slender thistle
#

Mainly yeah

drifting wedge
pale vessel
#

Google APIs suck

drifting wedge
#

with same prefix

pale vessel
#

They have low quota

#

You have to scrape

slender wagon
#

ik that's the point

drifting wedge
#

rip

slender wagon
#

so scraping?

drifting wedge
#

my OXYGEN BUBLEEES

#

NOOOO

slender wagon
#

how can that be done?

pale vessel
#

So Lavalink or ytdl/youtube-dl

slender thistle
#

Something tells me scraping for music bots is definitely a fun experience you'll hate yourself for

drifting wedge
#

@slender thistle has anyone applied for a bot as a selfbot?

slender wagon
#

ty 😄

drifting wedge
#

like for dbl in ur time

pale vessel
#

and some ip blocks

slender thistle
#

They can't

drifting wedge
#

u guys check?

slender thistle
#

Only bot accounts can be submitted

drifting wedge
#

oh

#

can they submit

#

it

#

and then change the id?

pale vessel
#

Wha

slender thistle
#

No

drifting wedge
#

o ok

slender thistle
#

The ID can't be changed KEKW

drifting wedge
#

oh

#

thats why i got fucking denied

#

by SPEEEEDY

earnest phoenix
#

Is it possible to set the status of your bot as mobile in discord.py?

drifting wedge
#

oh

#

i dont think so

#

u can run the bot from ur phone and it might work

slender thistle
drifting wedge
#

but i think not

slender thistle
#

No

earnest phoenix
#

oh f

slender thistle
#

Frankly, I very highly doubt it's possible

pale vessel
#

Why not?

slender thistle
#

Unless you edit the library yourself

earnest phoenix
#

i saw it done in js, hoping that it can be done in py

pale vessel
#

Ah

drifting wedge
slender thistle
#

It could probably be done in d.py if there's ever a variable for it

drifting wedge
#

or mod dpy

pale vessel
#

Probably need to modify the identity payload that's sent by dpy then

earnest phoenix
#

oh

slender thistle
#

But I'm just going to assume that it's hardcoded and ^

drifting wedge
#

u can mod dpy

pale vessel
#

unless there is a way to specify websocket options

earnest phoenix
#

ok ig i wont do it

pale vessel
#

Like in Discord.js

#

You shouldn't anyway, it's undocumented

#

I say that but I do it too, yikes

drifting wedge
#

is it possible to listen to a voice chat in dpy?

pale vessel
#

Probably

#

In Discord.js it's possible

drifting wedge
#

to listen?

pale vessel
#

Yes

drifting wedge
#

why is it allowed in djs

#

but not dpy

pale vessel
#

Be careful with it though

drifting wedge
#

SO STUPIDDDD

drifting wedge
#

ill say it

pale vessel
#

I'm not sure if it's supported or not

drifting wedge
#

but its for like voice recognition commands

pale vessel
#

It most likely is

#

Not saying it's not

#

But yeah

drifting wedge
#

uhhhh

#

fuck man

#

its fine ig...

slender thistle
#

Different libraries, different implementations

sterile lantern
#

if we have a DB that just has userid_amountoftokens do we still need to state that

#

so like 1_50tokens

#

ping if u respond

pure lion
#

@sterile lantern what

sterile lantern
#

privacy policy

#

do we need to state that we store user ids that assosicate to amount of tokens u have

#

assosciate*

pure lion
#

Wdym amount of tokens

sterile lantern
#

like currency

#

economy bot

pure lion
#

Oh

sterile lantern
#

it saves their data

#

in a .json file

pure lion
#

Yeah just state that you're storing their user ID

sterile lantern
#

ok ty

pure lion
#

Don't use json

#

Please

#

For god's sake

sterile lantern
#

eh its a beta

#

ill maybe just switch

#

to

#

quick.db

#

seems really easy to do

pure lion
#

Do it now

#

Like right now

sterile lantern
#

kk

#

i mean i kinda already have it set up

pure lion
#

Good

sterile lantern
#

just need to change the db.set functions n stuff

pure lion
#

The sooner you switch from JSON the better

zealous helm
#

That was a huge failure 🤣

zealous helm
#

No

pure lion
slender thistle
#

English-only rule still applies

teal plover
#

hello everyone

#

so im trying to implement some sort of "perk" for ppl that would vote

#

this perk would span across a couple hrs

#

how would i go around doing that?

old latch
#

what exactly do you need help with?

teal plover
#

how would i do that

old latch
#

like

#

how to get votes

#

?

teal plover
#

no

#

how to give voters a perk for X hours

#

lets say 1.5x XP for the next 5hrs

old latch
#

oh

#

make a table in your database named "boosts", then if a user votes put their id there + the date it was added. Then when they get the xp somehow u first check if their id is in the database, and if it is you give them the boost

#

that's how I would do it

earnest phoenix
#

listen for top.gg webhook requests, once you get a webhook request for a user, put their id in a database / mark them that they voted if you want to keep data minimal, and save the timestamp of that request in your database too.

when checking for the perk, hit up the database, get the user, if the perk has been active for more than n hours, remove it, otherwise use it

depending your database design, if the user doesn't have a perk, you either won't find a user in your database, or the user won't have their perk flag set to true

old latch
#

yeah we kinda said the same thing

earnest phoenix
#

yup :p

old latch
#

:)

teal plover
#

oh great

#

thank u guys

#

really appreciated

old latch
#

np

safe creek
#

this should state the reason in the ban in the same message right or do i havr to add an ctx.send statement thingy

#

ugnore the error in client

#

im going to cog the file

quartz kindle
#

that will make the reason show in the audit logs

#

if you want to show it in the message, you have to add the reason to the send

safe creek
#

ahhh ok

#

will it work if i add 2 empty lines then put the reason code?

#

member.ban(reason=reason))```
#

like that

#

ofc in the correct format

#

@quartz kindle

#

wait

quartz kindle
#

dafuq

safe creek
#

there?

pure lion
#

Is there a way I can set the cygwin terminal as my default terminal for vscode?

safe creek
#

im not good at explanation

pure lion
#

You're sending a ban object?

#

Oh nvm

safe creek
#

lol

quartz kindle
#

dude...

#

just

#

.send(f"bablabla {user} blablabla {reason}")

pure lion
#

F strings are hot

safe creek
#

yeah what i meant

drifting wedge
#

@slender thistle sorry for the thing, remmeber we were doing this?

#
channel2 = ctx.guild.get_channel(channel)
            if channel2:```
#

welp it didnt work

#

this is the entire command code: py @commands.group(invoke_without_command = True, case_insensitive = True) @cooldown(1, 0.65, BucketType.user) async def log2(self, ctx, channel1: str): if len(channel1) != 21: await ctx.send("Please mention a channel!") if len(channel1) == 21: channel = channel1[2:20] channel2 = ctx.guild.get_channel(channel) if channel2:

#

like theres more stuff in the bottom

#

ofc

#

but like thats the important part

hollow sedge
#

if len(channel1) != 21

#

What does that even tell you

#

@drifting wedge

drifting wedge
#

if the message isnr a channel mention

#

#development is [#development](/guild/264445053596991498/channel/272764566411149314/)

#

so if the message isnt that length it just sends that error

#

@hollow sedge

hollow sedge
#

OHH

#

That's a bad way to check though

#

just use channel1: discord.Channel

#

Instead of channel1: str @drifting wedge

leaden lake
#

Can anyone help me about my error ? I only got this on my raspberry, on my windows computer it perfectly works
The code : ```py
@client.event
async def on_ready():
db = sqlite3.connect('connect4.sqlite')
cursor = db.cursor()
cursor.execute("""
CREATE TABLE IF NOT EXISTS main(
user_id TEXT,
victorycount TEXT,
losecount TEXT
)
""")

The error : 

db = sqlite3.connect('connect4.sqlite')
sqlite3.OperationalError: unable to open database file
hollow sedge
#

Try adding sudo before you run it

leaden lake
#

okay

hollow sedge
#

@leaden lake did that work?

leaden lake
#

idk, it said "unable to import discord" but I imported it and my other discord bot perfectly works, So I done a sudo python3 -m pip install discord.py[voice] and it's installing to must things

hollow sedge
#

Oh ok

leaden lake
#

yeah it worked... huh, the file is created, I'll tell you if the bot works

hollow sedge
#

Alright

leaden lake
#

@hollow sedge the bot is working, thanks !!

hollow sedge
#

Anyway the programs usually require root permissions to work with files

#

So just remember that

leaden lake
#

okay, thanks, I will remember that to the future

zealous helm
#

I need help

hollow sedge
#

once again?

#

Didn't people already say not to ask for bot developer for discord help

pure lion
#

@zealous helm what's up

zealous helm
#

Anyone know a way to delete messages sent by the bot

pure lion
#

What lib?

zealous helm
#

What

pure lion
#

Are you trying to code?

zealous helm
#

Yes?

pure lion
#

Then

#

What library are you using to code your bot

zealous helm
#

Idk what that means

pure lion
#

h

#

What language?

pure robin
#

dbl.webhook.on('ready', hook => {
^
TypeError: Cannot read property 'on' of undefined

zealous helm
#

Bruh idk what you're asking

pure robin
#

help

pure lion
#

@zealous helm coding language?

#

Bro do you mean in discord?

#

Right click and then delete them

#

Clever lad

pure robin
#

yes

zealous helm
#

Anyone know a way to delete messages sent by the bot

pure lion
#

@zealous helm right click on the message, then click delete

zealous helm
#

I'm blocking you jfc

pure lion
#

Okay I love you too boo

pure robin
#

lol

zealous helm
#

Anyone know a way to delete messages sent by the bot

pure lion
#

@pure robin help this lad

pure robin
#

@zealous helm Bro, right click on the bot message, you will get an option to delete, click there and you are done

zealous helm
#

That's not what I'm asking

#

Obviously

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

zealous helm
#

It was 4 fuckin times

pure robin
#

Are you trying to do a say command?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

zealous helm
#

What

sage bobcat
#

One message removed from a suspended account.

pure lion
#

I'm going to cry

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

zealous helm
#

No

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

pure lion
#

Show us what you want

zealous helm
#

It's ok

#

I'll come back

pure robin
#

message.delete();

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

pure robin
#

I was saying it in case he meant that

pure lion
#

My crystal ball broke

sage bobcat
#

One message removed from a suspended account.

pure lion
#

I can't read his mind

sage bobcat
#

One message removed from a suspended account.

zealous helm
#

I'm aware

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

zealous helm
#

It's all good

#

I'll come back

pure lion
#

Dude

#

We're trying to help you now

sage bobcat
#

One message removed from a suspended account.

pure lion
#

Don't come back later asking the same thing

sage bobcat
#

One message removed from a suspended account.

pure lion
#

You're not going to get an answer

sage bobcat
#

One message removed from a suspended account.

pure lion
#

Complete bullshit

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

pure lion
#

How do I send messages on discord?

#

No no, how do I send messages on discord

#

No you don't understand, I want to send messages

zealous helm
#

Not big mad xD

sage bobcat
#

One message removed from a suspended account.

zealous helm
#

Yes

sage bobcat
#

One message removed from a suspended account.

pure lion
#

Satan help me

sage bobcat
#

One message removed from a suspended account.

cobalt urchin
#

So you can get an Idea of what I'm doing before I ask my question:

const guildInfo = bot.guildCache.get(message.guild.id)
switch (args[0]){
    case 'on':
        await guildSchema.findByIdAndUpdate(message.guild.id, {$set: {disabledXp: false}, $pull: {disabledCommands: {$in: ['rank', 'leaderboard']}}}, {upsert:true, new:true})
        message.channel.send('You have turned on XP for this server! I have enabled the \`rank\` and \`leaderboard\` commands for you.')
        break;
    case 'off':
     await guildSchema.findByIdAndUpdate(message.guild.id, {$set: {disabledXp: true}, $push: {disabledCommands: {$each: ['rank', 'leaderboard']}}}, {upsert:true, new:true})
     guildInfo.disabledCommands.push('rank', 'leaderboard')
     bot.guildCache.set(message.guild.id, guildInfo)
     message.channel.send('You have turned off XP for this server! I disabled the \`rank\` and \`leaderboard\` commands for you.')
     break;
}```


I want to remove the words `rank` and `leaderboard` from the guildInfo.disabledCommands array when args[0] is on. Since the array is always changing and If I remove one of them the value of the other element gets changed, what would I use or how can I go about  to make sure they always get removed no matter what position they are in the array ?
sage bobcat
#

One message removed from a suspended account.

pure robin
#

a

zealous helm
#

I'm not

sage bobcat
#

One message removed from a suspended account.

zealous helm
#

But since it's ending, I gotta say something

sage bobcat
#

One message removed from a suspended account.

pure lion
#

@cobalt urchin if args0 regex.replace(/your regex/, "")

zealous helm
#

Obviously idk what tf I'm so sorry I can't explain the niceties phenomenally

#

I have every right to say fuck y'all I don't want your help

#

And your mad over what

#

You're fuckin annoying I don't want your help

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

pure lion
#

You keep repeating the same thing over and over

sage bobcat
#

One message removed from a suspended account.

zealous helm
#

And you're both blocked so I can't see what's being said 😂

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

pure lion
#

Damn that's so funny

zealous helm
sage bobcat
#

One message removed from a suspended account.

zealous helm
#

Byeeee

sage bobcat
#

One message removed from a suspended account.

pure lion
#

@tame kestrel troll gameing

flat pelican
#

Hm

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

pure lion
#

Idk if this is my bad mood or not but fuck that made my day worse

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

flat pelican
#

I see

#

@pure lion If you aren’t going to give relevant information about what you need help, please leave this channel

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

flat pelican
#

In otherwise, you’ll be muted

hollow sedge
#

Guys I already told you they were using bot designer for Discord

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

flat pelican
#

Yeah I checked the messages above

sage bobcat
#

One message removed from a suspended account.

hollow sedge
#

He's not trolling

zealous helm
flat pelican
#

I didn’t really ask for another opinion about it but okay

hollow sedge
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

flat pelican
#

Please keep this channel on-topic now

#

Any off-topic/troll conversations will be muted

hollow sedge
#

I'm agreeing with you guys, I'm just saying they're not trolling. He apparently using BDFD, not an a actual language

flat pelican
#

Still not a reason to block people, or tell them to fuck off, they can state clearly with what they need help

zealous helm
#

Anyways
I need help with deleting messages in BDFD

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

lmao

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

flat pelican
#

Hey Tim

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

hi :3

hollow sedge
#

You know there's a BDFD server you can ask for help in

sage bobcat
#

One message removed from a suspended account.

zealous helm
quartz kindle
#

he was banned from bdfd

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

you can imagine why

sage bobcat
#

One message removed from a suspended account.

hollow sedge
#

bruh

quartz kindle
#

thats why hes asking here

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

quartz kindle
#

nope

#

i was here the first time he asked about the same thing

hollow sedge
#

Just make a second account and go ask there, honestly

flat pelican
#

Who is banned

quartz kindle
#

this onceAgain guy

sage bobcat
#

One message removed from a suspended account.

flat pelican
#

I see

earnest phoenix
#

i already said it but they straight up ignored it, nobody here will actually help you with shitty third party scripting languages because you don't have direct control over the output of the code - if you need help with bot makers go complain to their support guilds, if you're banned from there, well, that's a you problem

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

dont cry

eternal osprey
#

ooooh my bot is 90% in the queue

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

hollow sedge
#

it's a development in the queue process

eternal osprey
#

well, it has to do with bots in general doubt

#

exactly

sage bobcat
#

One message removed from a suspended account.

flat pelican
#

Muted them, thanks

eternal osprey
#

karen, what do you think?

hollow sedge
#

that is a #general thing though, i was joking

flat pelican
#

What I think is they’re right and that you should use #general

eternal osprey
#

okay.

#

my bad then

flat pelican
#

This channel is here for code related help, and not to discuss about queue

eternal osprey
#

yeah i was not trying toa rgue or something

#

i was just a bit happy to see that it didn't take much time after all.

sage bobcat
#

One message removed from a suspended account.

flat pelican
#

It’s fine, just clarifying the channel’s purpose

sage bobcat
#

One message removed from a suspended account.

eternal osprey
#

okay i will!

#

but @sage bobcat i understand it, don't be so mean man.

pure lion
#

So does anyone actually have any coding/programming issues

sage bobcat
#

One message removed from a suspended account.

hollow sedge
#

guys just drop it, awsome understands

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

is my client glitched or did the muted guy not receive the muted role? @_@

eternal osprey
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

quartz kindle
#

when is discord not fucking xD

hollow sedge
#

is there a good way to actually learn CSS without spending many hours because I usually just try random stuff until it works

quartz kindle
#

well thats how i learned it

#

lmao

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

hollow sedge
#

sigh i hate it

#

like I want to get to the actual backend part of my project but then I have to spend days working on the CSS

quartz kindle
#

ikr

#

i developed a deep hatred for frontend too over the years

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

interesting

sage bobcat
#

One message removed from a suspended account.

hollow sedge
#

that does seem interesting

#

i like how it renders immediately

pure lion
#

I just use libs

#

And react

hollow sedge
#

react and libs seem nice but i just want to create a simple web app 😭

earnest phoenix
#

cant remember the last time i worked with vanilla js

hollow sedge
#

i mean there isnt much you can do with vanilla anything

#

unless you're writing your own package

quartz kindle
#

how not lol

#

you can do literally anything with vanilla js

pure lion
#

Yeah that's the idea

#

It just takes long

#

Vanilla js in browser is like

#

Uhh

#

Beeg muscale

quartz kindle
#

lmao

pure lion
#

You need to train it but once you have it you're a god

quartz kindle
#

my first experience with js was through jquery

pure lion
#

What's so good about jQuery?

quartz kindle
#

but then i dropped jquery when i learned how to do the same things without it

earnest phoenix
quartz kindle
#

jquery makes web js easier by providing a ton of shortcuts and short syntaxes

#

for example instead of what cry posted, you would just do div = $("#screencont")

earnest phoenix
#

jquery was relatively okay

pure lion
#

So I can just $ = document.getElementById?

#

Epic

earnest phoenix
#

it's just not suggested in modern web dev anymore since there are faster technologies and SPAs

hollow sedge
quartz kindle
#

but there is so much bloat these days that even jquery is "fast" compared to todays tech lmao

pure lion
#

What's a lodash anyway

earnest phoenix
#

true

#

i remember starting out with react and using create-react-app

quartz kindle
#

lodash is also a mega collection of functions

earnest phoenix
#

oh my fucking god that has so much bloat it's insane

pure lion
#

For some reason npm i -g won't set to path any more

#

Have to use npx now

#

With my potato pc that's a little annoying

quartz kindle
#

rip

pure lion
quartz kindle
#

wut

pure lion
#

What kinda shit?

earnest phoenix
#

utility functions

quartz kindle
#

basically every time you need to make a custom function for something simple, like looping over an array and doing whatever, its possible that lodash already has a function that does the same thing lol

pure lion
#

Ah

quartz kindle
#

for example

pure lion
#

That looks cool

#

But like

#

Why not just steal the source code

#

Of that one func

#

Instead of yknow

#

Installing

quartz kindle
#

exactly

#

plus most of the things they have are pretty easy to do on your own

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.