#development

1 messages · Page 1793 of 1

quartz kindle
#

yes

#

although there is another bot with the same name

#

which has nothing to do with mine

lyric mountain
quartz kindle
#

yes

lyric mountain
#

what are arabic parts?

opal plank
#

i want my arabic finger and 2 lungs pls

#

dont ask why

quartz kindle
#

ancient arabic astrologers had a system of mathematical objects that were calculated from combining the positions of 3 other objects

#

for example you combine sun moon and mercury in a specific way, and you obtain the position of an abstract point that was assumed to have a certain significance

lyric mountain
#

ooook...

earnest phoenix
#

Tim has knowledge beyond us

quartz kindle
#

there are a hundred something objects calculated this way that became known as arabic parts or arabic lots

#

the most famous one being the "part of fortune" which is a combination of sun moon and ascendant

#

supposedly indicates how a person can achieve his idea of fortune

lyric mountain
#

too confusing

quartz kindle
#

fortune in the sense of luck, not money

#

to have good fortune

#

it is indeed very confusing

#

hence why one needs a couple years of study and experience to understand these things

#

however people are quite quick to dismiss it and troll it without even understanding it

lyric mountain
#

ig i'm more of an astronomy guy, never really understood how astrology works

quartz kindle
#

ye i used to be too

#

but once i started understanding it, it became quite fascinating

#

and i accidentally learned a shit ton of astronomy because of it

lyric mountain
#

lul

earnest phoenix
#

Hello, I have an app in express and I want to know how to know if the image embed was opened by discord and not in the browser? Example of "image embed":

quartz kindle
#

the world's defacto planetary calculation library in C was written by two dudes with PHD in astrophysics

opal plank
#

reading is just staring at a piece of dead wood for hours and hallucinating

earnest phoenix
quartz kindle
#

their code is a mess tho, 25 year old standards

lyric mountain
#

but are you really willing to travel that path?

quartz kindle
#

reading code written by scientists is like reading code written by NASA, you dont understand shit

earnest phoenix
lyric mountain
#

discord needs to access the url to retrieve the image

quartz kindle
#

you want to know if your image was visualized/downloaded?

lyric mountain
#

you can technically find the request made by disc and handle it

quartz kindle
#

ye

opal plank
#

doesnt the cnd cache it past cloudflare?

earnest phoenix
quartz kindle
#

you should be able to see the user agent

#

and request headers

opal plank
#

you'd realistically only get 1 time, no?

lyric mountain
#

probably

opal plank
#

discord will likely cache it

lyric mountain
#

you'd need to use some query param to bypass cache

#

like https://url.tld?p=123

#

and chance p for every request

quartz kindle
#

does discord cache it server side tho? that sounds stupidly inefficient

#

they should cache it client side

#

the client should fetch the url

lyric mountain
#

cloudflare does if it's a frequently accessed page

earnest phoenix
opal plank
#

if u dont know what user agent is, you got a long way to go

#

and this will likely be above ur skill level rn

quartz kindle
#

how do you serve the image through express?

#

via static file or via a router?

earnest phoenix
#

Ignore const file = i'm testing the embed preview

quartz kindle
#

so you can literally log req.headers

earnest phoenix
#

Yes

quartz kindle
#

and it will give you all the information about who/what is accessing

earnest phoenix
#

thinking Let me see

#

Oh hashflushed localhost

opal plank
earnest phoenix
#

xd

quartz kindle
#

you forgot the meaning of life

opal plank
#

thats on the params tho

#

query params

slender thistle
earnest phoenix
opal plank
lyric mountain
#

it'll be empty if you're poor

earnest phoenix
lyric mountain
#

no

earnest phoenix
#

a

lyric mountain
#

user-agent is what was used to access it

slender thistle
#

Beer all the way

lyric mountain
#

just check if it contains discordapp.com

opal plank
#

unless it still comes from the old domain

lyric mountain
#

to be safe, also check for discord.com

opal plank
#

might just check for discord

earnest phoenix
lyric mountain
#

MAYBE

earnest phoenix
lyric mountain
#

because it's when discord accesses the image for showing

#

it won't make a request after it's been loaded

earnest phoenix
quartz kindle
#

and see if there is a difference

#

thats what you wanted to know right?

#

if there is a difference, then yes, its possible, if there is no difference, then no its not possible

lyric mountain
#

like, there's not really an easy path for such stuff

lyric mountain
earnest phoenix
#

I tried it on the web and it gave me different

#

but i see that the discord request has less properties than when i open the link

quartz kindle
#

so you see, there is a difference

#

therefore, yes, you can know if it was opened in a browser or in the app

zenith terrace
quartz kindle
#

you are undefined

zenith terrace
#

your whole life is undefined

quartz kindle
#

:(

#

you're not wrong

zenith terrace
#

exactly

rose warren
#

If the cheese directory has an index file domain.com/cheese will load that.

spice hearth
#

I'm using the command to add some roles.

and I'm saving the information in the database.

And after a while, I'm running a function to remove the information I saved in the database, but for some reason the excecute MySQL delete command isn't working.
Looks like it worked. But when i go checks the database, the information still there.

python

rose warren
#

Anything in your logs?

slender thistle
#

Are you sure your query is actually running properly

spice hearth
#
try:
    delete_query = f"DELETE FROM `d_roles` WHERE `id_roles`='{role_id}' AND `discord_id`='{user_id}'"
    cursor.execute(delete_query)
    db.commit()
    print('Deleted Rows:', cursor.rowcount)
except pymysql.connect.Error as error:
    print(f"Failed to delete record from table: {error}")
finally:
    cursor.close()
    db.close()
    print("connection terminated.")```
spice hearth
slender thistle
#

F-strings with SQL queries ok

spice hearth
#

sorry, what?

slender thistle
#

Does pymysql support prepared statements?

#

That and what happens if you except Exception instead of handling just one exception type?

spice hearth
#

sorry I didn't understand, what do you mean.
is it to remove the exception?

slender thistle
#

It means to do

#

except Exception as e

#

Aka

#

Handle ANY raised exception

#

Instead of pymysql.connect.Error

zinc wharf
#

@spice hearth I never used mysql in PY, only PHP and JS, but, are you're role_id and user_id actually outputting something??

spice hearth
slender thistle
#

Is that how shit is in MySQL actually

spice hearth
#

🤣

slender thistle
#

Do you wrap those names in apostrophes

rose warren
#

If they're strings yeah

slender thistle
#

Table name? Column name?

rose warren
#

Oh those aren't necessary but it'll work regardless

spice hearth
#

I was using it without, but then I put it on to see if it would make a difference and it still doesn't delete

slender thistle
#

Oh I see

spice hearth
#

it gets even crazier if I tell you the following.

#

I took the SQL code to delete it directly in mysql php admin, and guess what?
did not delete anything.

rose warren
#

Did you get any error message doing it that way?

spice hearth
#

0 lines affected. (Query took 0.0005 seconds).

rose warren
#

Are you sure you don't need the database name in front of the table name? For example DELETE FROM mydb.mytable WHERE...

spare badger
#

When using the DELETE query you already need to have the database you want to use selected.

#

You use the USE <databasename> query for that but in phpmyadmin you can just click the database in the left column and then select the query tab.

spice hearth
#

yes, of course, but I need the bot to do that.
Thanks

spare badger
#

Yes you have to select the database first then using the USE query.

wooden kindle
#

epicness

#

can someone help me out

#

im looking to buy a raspberry pi to host my bot

#

but idk what one

#

can someone help me out

#

it will be to host a music / general bot

spice hearth
#

Same thing, 0 lines affected.

rose warren
#

What if you select instead? Does it return anything?

#

It might be in your table structure. Are discord_id and id_roles both stored as string values or integers?

spice hearth
#

both are int.
and only return "0 lines affected"

last tapir
#

hi

rose warren
#

That's the problem then

last tapir
#
let quoteSample = "3 blind mice.";
let myRegex = /[^a-z0-9]/gi; // Change this line
let result = quoteSample.match(myRegex); // Change this line

console.log(result);

This also returns spaces??

rose warren
#

They shouldn't be int

spice hearth
#

I'm contacting the hosting database support to see what they say. I come back to tell you what the problem was. Sure it's silly stuff.

rose warren
#

Try removing the apostrophes

spice hearth
rose warren
#

You're storing as int but searching for a string

last tapir
rose warren
#

I'd recommend storing as a string

rose warren
spice hearth
# rose warren They shouldn't be int

changed to delete as str and as int
and nothing has changed. same problem.

Thanks everyone for trying to help. I will wait for a response from the host.

opal plank
# wooden kindle

is this something pre-built or does everyone use the same template?

wooden kindle
#

everything *

opal plank
#

i see

#

ty

wooden kindle
#

np

#

i made every command other than ascii

#

i got my friend to make that

vivid fulcrum
#

and it's a completely generic bot

#

meaning pretty much nobody will use it

#

there are bots that do exactly what you do, but better

opal plank
#

bots need to be innovative

vivid fulcrum
#

in order to have a successful product, you first need to have a proper problem you want to solve with your product

#

im at a summer business camp right now and this is exactly what we're covering

#

why you can't be generic and how to beat your competition

boreal iron
#

Wow still

solemn latch
#

tbh, there are bots i review and get a dm from the owner 5 minutes later and dont remember the bot(so generic).
even doing something a tiny bit different helps a ton with making users want to use your bot.

spice hearth
#

found out it was

#

While the hosting support staff did not assist me, I started testing.

Until I finally looked more closely and saw my serious mistake.

i was trying to use a discord role id to delete an id from the primary table.

In other words, it would never work.

Since I should use role_id and not id_roles.

#

before:
DELETE FROM u629748736_temproles.d_roles WHERE discord_id=136933432973459457 AND id_roles=809936049781473290

now:
DELETE FROM u629748736_temproles.d_roles WHERE discord_id=136933432973459457 AND role_id=809936049781473290

#

Thanks anyway, guys.

#

🤣

slender thistle
#

kekw

rose warren
#

I literally started typing a message asking if you had spelled your column and table names correctly but deleted it to reply to another message you'd sent in the meantime 😂

#

Also, you were trying to delete a string in a column of integers though so at least we noticed that 😅

boreal iron
#

html, body
{
margin: 0;
padding: 0;
height: 100%;
}

#

Also it’s not needed to display a div as block

#

Is already a block

#

Your “stockyheader” will not be sticky if that’s supposed to

#

It won’t be fixed at the top.
If your content is larger than the viewport and you scroll down, it’s gone.

#

header
{
height: 50px;
position: fixed;
top: 0;
left: 0;
right: 0;
}

#

The content “below” will be behind the header since it’s in the foreground

#

It’s required to push your content down, exact the same as the header height

#

content
{
padding-top: 50px
}

Or margin-top

Depends on your structure

sudden geyser
#

You could export it in the same file.

#

Or just make a separate file for it

#

You can't have two files with the same name, however.

#

What library are you using? You could keep a collection of template embeds (embeds with pre-built form) and require/import them as a base. For example:

// Note: Untested!

// index.js
module.exports = {
  embeds: {
    default: () => new Discord.MessageEmbed()
      .setTitle("Yeah")
  }
}

// commands/ping.js
const index = require("../index.js")

module.exports = (message) => {
  let embed = index.embeds.default()
    .setDescription("Pong!")
    .setColor("#FFFFFF");

  message.channel.send(embed);
}

Or are you trying to split the design of the embed away from doing it in the runner? Am I confused and missing something?

prime mist
sudden geyser
#

Yeah I assumed that would be the issue

#

damn it mutable state

#

hold on magic trick

#

bam

prime mist
#

Yeah that would work.

dawn acorn
#

Could anyone tell me how I solve this error? I've tried everything and it didn't work out this error occurs when I type some commands doesn't occur with everyone

sudden geyser
#

You tried requiring a file outside the correct context (or that didn't exist).

#

Assuming config.json sits in your project root directory and you tried requiring it from ./commands/autorole.js, you have an extra ../ that you don't need.

latent heron
#

TIL Rust defines variables under interpretation as a constant value unless you're allowing a mut mutation operator to be passed

distant cobalt
#
const voiceChannel = client.channels.cache.get('858158182882213920')
    const connection = await voiceChannel.join();```

```js
TypeError: voiceChannel.join is not a function```
how do i fix this?
sudden geyser
lament rock
fresh verge
#

So, whenever I loop through a dictionary variable, so like an array but with keys. and values, anyways how can I loop through it to get the key, and the value of the key?

sudden geyser
#

What language are you using?

flat copper
fresh verge
lost wadi
#

How do I learn to reduce numbers?
Example: 1560 => 1.56k

sudden geyser
#

Why not just use a switch (heck, there are even shorter, efficient ways )

flat copper
#

Still

#

Why this error

sudden geyser
fresh verge
sudden geyser
# flat copper Why this error

You're trying to send/edit a message while attaching no content, so it probably has to do with the embed you modify then send a request to edit the message with the new embed.

sudden geyser
flat copper
fresh verge
flat copper
sudden geyser
lost wadi
#

javascript

sudden geyser
# flat copper And what is the shorter way?

Either:

  1. Replacing it with a switch.
  2. Matching the emojis to a value to search for when calling getcmds(...).

As for your issue at hand, you should be concerned about what the value of embed is before sending it. Just a simple console.log would show you what's empty or not.

flat copper
sudden geyser
sudden geyser
twilit geode
#

anybody know what <*>: means?

sudden geyser
#

any?

flat copper
#

When I do console.log(cmd[0].value)
I get this :

twilit geode
sudden geyser
#

You're supposed to be logging embed before you send it.

flat copper
crimson vapor
#

its a bad idea to have your image a discord avatar url because every time you change your avatar you would need to change it

twilit geode
#

Can someone help me out with the Gson for Event_District_Points https://www.thebluealliance.com/apidocs/v3
I'm not sure how to do the <*> because its not going to be a specific value

sly sierra
#

wait what extension is that for that minecraft text AI_sataniaGun

bright thorn
#

I need discord.py support for. 30 mint anyone can do help please come vc i need help 👍

oak nymph
#

how do I save cooldowns and make em work even after my bot goes offline?

oak nymph
cinder patio
oak nymph
#

smh

cinder patio
#

but you don't know how to save cooldowns into a db?

oak nymph
#

no

tulip ledge
#

how do u send an image to an express server? I used res.sendFile(path) but it returns undefined when I fetch it

copper cradle
# oak nymph no

check the database when you start the process, and start a cooldown based on the remaining time

#

something like

"creating cooldown"
cooldown => save the end date to the db

"after restarting the process"
check the database => start a cooldown that ends on that date

tulip ledge
lusty quest
#

or use redis so you dont need the map and timeouts

opal plank
#

keydb/redis would be preferred here

#

just make sure u have it set to save

umbral lake
#

hey
I can define the first mention with message.mentions.members.first
but
how to define the second and third mention in the command?

earnest phoenix
#

has anyone used canvas npm?

lusty quest
#

i used it for rendering graphs

pale vessel
#

I used it for some cool cards

feral aspen
#
const args0 = "employee";

// Consider this object as the database.
const object = {
    jobs: [
            {
          id: "employee"
        };
    ];
};
#

I'm trying to check if the job the user tried to buy is already bought and already in the jobs array of objects.

#

Anyone got what I mean?

lusty quest
#

what database?

feral aspen
#

MongoDB.

#

Consider the object object as the document.

lusty quest
#

did you have different subobjects in jobs?

feral aspen
#

Yes.. there are other objects that have ids like employee, doctor, etc.. but when the user tries buying a job, I don't want him to have two objects with ids of employee.. so I want an if statement to avoid that.

lusty quest
#

jobs.$.id would be the path you want to use for the query i guess

#

$ is a wildcard for Array keys so instead of jobs[0].id you just use the wildcard

feral aspen
#

Ooo.

#

A start is:

if (work.jobs.$.id ...)
lusty quest
#

?

#

the path is for a MongoDB query

feral aspen
#

work.jobs.$.id

#

Work document, the jobs array, $ which is the wild card for array keys, and .id

lusty quest
#

work is your collection name or a object inside your document?

feral aspen
#

.. the collection name.

lusty quest
#

then it wont work this way

feral aspen
#

Wait..

#

It's like defining this...

#
const work = await Work.findOne({ userID: message.author.id });
#

Sorry, I forgot what you call that.

lusty quest
#

thats a query

feral aspen
#

I messed up.

feral aspen
#

What can I do to check that, though?

wooden kindle
#

im looking for a raspberry pi to host my discord bot

#

and suggestions

#

its got around these stats

feral aspen
pale vessel
#

No, that's only for queries

#

you have to use array.find()

#

Use that for the query and if it doesn't return null, then the element exists

#

You just have to find it manually from the result

sacred aurora
feral aspen
pale vessel
#
const work = await Work.findOne({ userID: message.author.id, "jobs.id": "workId" });
if (!work) return;

work.jobs.find(({ id }) => id === "workId");```
#

it returns the full object

#

So you need to get the value manually since the query is only for filtering

sacred aurora
#

yeah right

#

does mongodb have a function to get specific element from an array?

feral aspen
pale vessel
#

I only see one array

#

Array of objects?

#

Is the object inside an array of objects?

#

It's not since that's from Work.findOne()

feral aspen
pale vessel
#

findOne() returns that object?

feral aspen
#

.. but I'm considering the object like const work = ...

#

object = const work

pale vessel
mild agate
#

Do getters get removed when spreading objects?

pale vessel
feral aspen
#

Sorry I meant Yes for Flazepe, wrong response.

pale vessel
#

Okay so you're using const work = await Work.findOne({ userID: message.author.id, "jobs.id": "workId" }); right?

feral aspen
#

No.

pale vessel
#

What are you using?

feral aspen
#

Normal.

#
Work.findOne({
    userID: message.author.id
}, async (err, work) => {
    if (err) console.log(err);
    if (!work) {
        return;
    } else {

    }
});
pale vessel
#

What are you trying to find?

feral aspen
#

Let's consider work as the object right?

pale vessel
#

Yeah

feral aspen
#

Yup, object is work.

#

.. exactly.

#

We have a job property which is an array of objects that contains an id (example) employee, which is a job I bought.

#

.. now suppose I accidentally bought it again, there would be two objects inside the jobs array with the same ID of employee.

pale vessel
#

job or jobs?

#

Ah jobs

lusty quest
#

if no go for a Pi4

#

if you want to go fancy, look into Turing Pi

pale vessel
#

So you want to make sure the job doesn't exist in the DB before letting the user buy?

sacred aurora
#

so the structure is like

{
  userID,
  jobs: Array<{
    id: string,
    ..andOther
  }>,
   ...andOtherThings
}

right?

pale vessel
#

You can use that. If it returns null, then the job is not in the array

lusty quest
#

since its an array

feral aspen
#

I haven't.. but let's take another example.

const work = {
    jobs: [
            {
          id: "employee"
        };
            {
          id: "doctor"
        };
            {
          id: "youtuber"
        };
    ];
};
sacred aurora
feral aspen
#

Someone buys employee again, there is already an employee, but I want it to return since there is already one.

wooden kindle
wooden kindle
lusty quest
#

the PI4 comes with a faster Processor and more Ram, so its a no Brainer

wooden kindle
#

how much does it cost

sacred aurora
#

so in ex
i have an array

{
"keyword": [
    "a",
    "b",
    "c"
  ]
}

i can query that with {keyword: "b"}

lusty quest
#

depends on your country

wooden kindle
#

uk

sacred aurora
#

same work with object

lusty quest
#

its a british company that makes them, so it should be not this expensive

wooden kindle
#

okay nice

lusty quest
#

they start at 35$

wooden kindle
#

because rn im hosting it on my old laptop and i wanna use that for school

#

so im gonna buy that and just have it up

feral aspen
#

If it wasn't an array of objects, i would use Object.keys

wooden kindle
#

but ima apply for verification in like 2 months

#

because i can but not atm

lusty quest
#

depending on how much Growth you expect the 4GB model should work for a while

wooden kindle
#

i mean the music feature is used often

lusty quest
#

or you spend the money more and get the 8GB model

wooden kindle
#

yea

#

the music feature is used often

#

then the other cmds are used very often

worn drift
#

Anyone know a way to do this

Have someone react to a specific message, then have a bot post a pre-written message in a different text channel containing their discord userid

ben hit this specific reaction on a specific message

In another text channel: ben reacted to that message, their user ID is 488733804

#

I'm looking for like a public bot to do that. Not sure if this is the right text channel for that but I'm sure someone here will correct me if needed

maiden gull
#

Could you elaborate on that? Maybe I just don’t understand but I just don’t get it kek.

opal plank
#

okay, maybe i exagerrated, but its absurdly easy

#

but no, idk any bot that do that, but this isnt the place to searchf ro bots

#

use the search function in the website

worn drift
#

Bot post in a text channel: react to this message with this emoji ❤️

Same bot, different text channel: Ben hit the heart button, user ID is 49596849e0

opal plank
#

if u wanna MAKE a bot that does that, heres the right place

#

i understand what you want

maiden gull
#

oh thats very easy

opal plank
#

this is not the place for it tho

#

unless you wanna MAKE a bot, then i can give u instructions on how to

worn drift
#

Well if someone makes a simple bot doesn't it need to be hosted online, idk

opal plank
#

it does

worn drift
#

Well what's a good host for a very basic discord bot idk

opal plank
#

u can host on ur pc, mobile, some free website, a paid vps, anywhere

#

^^

#

for something that basic, just use repl or heroku

maiden gull
#

..

worn drift
#

Which free websites would let you host a simple basic discord bot

opal plank
#

if you bothered reading what i sent

#

you've known

worn drift
#

Oh. Repl or heroku

earnest phoenix
#

If you host on heroku it will only be active 3/4 of a month I think.

earnest phoenix
#

Oh alright

proud plover
#

If you create One More App In Heroku Then You Can Host It 24/7

#

Like In The First App If The Time Has Reached Its Limit Then You Use Second App Which You Created And Host It

slender thistle
#

Your per-month hours are shared between all apps, no?

proud plover
#

They Are Not Shared

slender thistle
#

Why the fuck would you have 1000 hours for an app in a month

proud plover
solemn latch
opal plank
#

the real question is: Why We Talking With Every Word UppperCased?

solemn latch
#

because This Is Development

#

it's The Right Way To Type

spare badger
#

Its A Hype

earnest phoenix
#

MY COMPUTER'S WORKING AGAIN

#

@quartz kindle tytytytytyty

#

i can now boot into windows 7 but ubuntu's entire /dev/sda4 partition is corrupted and/or the file system is unknown for some reason

wintry inlet
opal plank
quartz kindle
#

testdisk is one of the best programs for that

#

otherwise just format and reinstall

near stratus
hasty lotus
#

does anyone know what version of the api the latest v11 of djs uses ?

modest maple
#

isnt v11 of djs super old?

hasty lotus
#

"super old"

#

nah

#

it's not super old

#

it is deprecated but it's not "super old" x))

modest maple
#

Sip Looking at the code it is super old

quartz kindle
#

v11 uses api v6 i believe

modest maple
#

and also I dont think it will even work now

hasty lotus
hasty lotus
modest maple
hasty lotus
#

that's not the issue x)

modest maple
#

then why are you worried about v11

hasty lotus
#

i was just wondering if djs 11 still could work

near stratus
quartz kindle
#

v11 as it is pretty much insta crashes because of stage channels

#

but if you modify it a bit, it will work more or less

hasty lotus
opaque acorn
#

is it possible to put a user banner on a bot?

sudden geyser
#

I don't believe so.

cinder patio
#

holy sh-

sudden geyser
#

node_modules

quartz kindle
#

fuck react

opaque seal
#

vue > react

cinder patio
#

no but ok

near stratus
cinder patio
#

Maybe you're also counting the npm modules the template uses?

#

I dunno

earnest phoenix
#

Hello discord officials ask me some questions

#

Can any one help me

near stratus
#

not a big deal

earnest phoenix
#

Brother my English is not good

earnest phoenix
earnest phoenix
desert sun
#

Hello, I am reporting a bad moment that I am having with the html code that I want to edit for my bot's invitation site.
I've added a <button onclick="function()">Sample Text</button> on my code and onclick a fuction to toggle the picture everytime you click on the button.
The problem is that in my test topgg.html file it works perfect but in the top.gg website the function is not working (or maybe the <script></script> is not read)
What it is going on?

copper cradle
#

you're not allowed tu use js

earnest phoenix
#

don't think ur allowed to js

copper cradle
#

in your bot's desc

#

no scripts will work

#

so you better get creative

desert sun
#

Ok, I see, js is not allowed. Thxu for the respond @copper cradle @earnest phoenix

cinder patio
pale cobalt
#

Eyyow

feral aspen
#

Is this the best way to check if "employee" is already there?

!!work.jobs.find(val => val.id === "employee")
const work = {
    jobs: [
        {
            id: "employee"
        }
    ]
};
#

!! returns a boolean.

sudden geyser
#

It works, yes.

#

The !! really depends on you though.

#

An object truthfully evaluates to true.

#

So, depending on where/how you're using the object, you may not need to forcefully transform it to a boolean.

#

But if you just want a boolean, just use .some instead of .find

earnest phoenix
#

God damnit Lite

sudden geyser
#

Stole your thunder smirk

feral aspen
#
work.jobs.some(val => val.id === "employee"); // returns true || false
earnest phoenix
#

You don't need the two logical NOT operators (!!) as a prefix as Array.prototype.some() already returns a boolean

feral aspen
#

Woops...

#

Edited.. now I think it's correct.

earnest phoenix
#

yes

feral aspen
#

Thanks!

twilit harness
#

Mmmm racist

latent heron
#
use hyper::{Body, Request, Response, Server};

async fn handle(_: Request<Body>) -> Result<Response<Body>, Infallible> {
    Ok(Response::new("This is a test response".into()))
}

Would this be a sound method for HTTP requests in Rust?

sudden geyser
#

It doesn't involve unsafe, so yes, it is sound (assuming the calls to the libraries don't end up producing unsound code).

#

Though I've only used actix-web and not hyper.

cinder patio
#

maybe look at the transpiled file?

lofty cedar
#

does anyone know how to write something in pygame with interlines? like if i have \n in pygame it anyway write it all on the same line

latent heron
#

i originally was using deprecated rust-http before i moved over

sudden geyser
#

I just use it since it's the de facto in the community and one of the fastest frameworks (behind C++ dragoon)

latent heron
#

also i thought unsafe wasn't really a big thing unless it had to be strictly typed

#

gotcha

#

i'm a php major trying to move to rust

#

because i'm coding the top-gg/rust-sdk for shits and giggles for @humble gyro mmLol

sudden geyser
#

Though actix had a bit of controversy with its use of unsafe

latent heron
#

since he's had the repo existent for years and never wrote code

#

unsafe i don't think is too big a thing

#

just seems to be a big no-no in the rust dev community

sudden geyser
#

It's really how it's used and why.

latent heron
#

🤫 don't tell the elites but i'm pretty sure unsafe rust is free and isn't bad

#

although that's my very amateur opinion

sudden geyser
#

wdym free

latent heron
#

joking as in freedom

#

like it's completely okay

#

you could probably make everything unsafe

sudden geyser
#

ah

#

yeah unsafe is like that

#

it's all sunshine and rainbows until it's used incorrectly

#

the standard library is full of unsafe

latent heron
#

oh i'm clinically insane

#

so i love errors

sudden geyser
#

Nah you like undefined behavior 🙃

latent heron
#

this is the kind of stuff i'll write and then later regret my actions for

cinder patio
#

wait

latent heron
#

i shall wait

cinder patio
#

there is code in the rust-sdk repo

latent heron
#

oh ther is?

#

oh there actually is, in a branch outside of master

cinder patio
#

but it hasn't been touched in 7 months and it's not complete

#

so go on bloblul

#

you could build off of it though, doesn't seem like it has much going on

latent heron
#

ehh, i'd rather make my own

#

they only coded some structs

#

that's not really much

cinder patio
#

yeah

twilit geode
#

json input:

[
  {
    "city": "New London",
    "country": "USA",
    "key": "frc500",
    "name": "U.S. Coast Guard Academy, USCG Foundation, USCG Alumni Association & Local Supporters & Grosso Regional Vocational Technical High School & Local Home School Community & New London Magnet High School & Westerly, RI  High School",
    "nickname": "Team 500/Team USA",
    "state_prov": "CT",
    "team_number": 500
  },
  {
    "city": "Manchester",
    "country": "USA",
    "key": "frc501",
    "name": "AC Trust/Stu, Sam & Lexxie/Louis P. Cote Inc./Geneia/Liberty Utilities/New Hampshire Stamping Co&4-H&Goffstown High School&Manchester High School-West",
    "nickname": "The PowerKnights",
    "state_prov": "New Hampshire",
    "team_number": 501
  },
// more objects...
]

java:

        public Team_Simple[] getTeamsByPageNumberAsSimple(int pageNumber) throws IOException {
            Request req = new Request.Builder().url(url+pageNumber+"/simple").addHeader(readAuthTokenId, readAuthToken).addHeader("Last-Modified", lastModified).build();

            Response rsp = client.newCall(req).execute();
            
            Team_Simple[] teams = new Gson().fromJson(rsp.body().string(), Team_Simple[].class);
            lastModified = rsp.headers().get("Last-Modified");
            
            return teams;
        }

err:

Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
        at com.google.gson.Gson.fromJson(Gson.java:944)
        at com.google.gson.Gson.fromJson(Gson.java:897)
        at com.google.gson.Gson.fromJson(Gson.java:846)
        at com.google.gson.Gson.fromJson(Gson.java:817)
        at com.github.daflamingfox.api.TBAApi$List.getTeamsByPageNumberAsSimple(TBAApi.java:80)
        at com.github.daflamingfox.Test.main(Test.java:13)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
        at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:349)
        at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:70)
        at com.google.gson.Gson.fromJson(Gson.java:932)
        ... 5 more

so i see that yes; there is an object 1:2, but that should be fine? Im trying to get an array of Team_Simple objects

latent heron
#

err

#

@drifting shell

lyric mountain
#

you...wh....fjaw...man

latent heron
#

start crying

lyric mountain
#

wtf

#

pascal snake case

#

long af method name

twilit geode
#

yes

#

this is java

lyric mountain
#

gson

lyric mountain
#

TIHI that snippet

twilit geode
#

your welcome

#

you should see some upcoming methods

lyric mountain
#

well, so the issue is that you're trying to convert an array to json obj

#

you cant

twilit geode
#

getMatchKeysForTeamAtEvent

twilit geode
#

it should be converting an array of json objects to an array of objects in java

lyric mountain
#

the input json is an array not obj

twilit geode
#

ik

#

its an array

#

of objects

#
[ // array
  { // object
  },
  { // another object
  }
]
lyric mountain
#

that's an array

twilit geode
#

yes

lyric mountain
#

you cant

twilit geode
#

omg

#

Team_Simple[] teams = new Gson().fromJson(rsp.body().string(), Team_Simple[].class);
this should be asking for an array of Team_Simple objects

#

which is what the json is

#

yes?

lyric mountain
#

no

#

there are many issues with what you're doing

#

but lets say...its not like that

twilit geode
#

explain

#

please

lyric mountain
#

read the docs

#

they show there how to properly deserialize an array

twilit geode
#

k

#

so I have a collection, not an array?

fallen holly
#

Idk how to fix this

feral aspen
#

It's npm install discord.js not npm install dicord.js

lyric mountain
copper cradle
last tapir
#

i have an array and i am using the .some() method, sometimes it says cannot read property ... of null, how can i check if there is values in the array

#

the array is defined as lol

copper cradle
#

just check the length of the array

last tapir
#

i tried this if (lol.length && lol.some(...)) didnt work

#

maybe since its null, lmc

copper cradle
#

...

#

why would you call some on lol before even making sure it's not empty

#

just check if the length is 0, if it is not do the thing,

feral aspen
#

Make sure it's not null. If so, just do if (lol && ...)

quartz kindle
#

what is the full error?

#

cannot read "some" of null?

last tapir
#

cannot read property length of null

quartz kindle
#

so lol is null

#

just do if(lol &&)

feral aspen
last tapir
#

ooo alrighty

#

thanks!

quartz kindle
#

or if(Array.isArray(lol) &&)

#

if you want to strictly check if its an array and nothing else

last tapir
#

yup for sure. 👍

#

thanks!

lyric mountain
#

but ye, barely any lib nowadays use arrays

earnest phoenix
twilit geode
#

so yes I was trying to deserialize an object, but my test json was working fine

lyric mountain
#

you shouldnt create more than 1 gson instance

lofty cedar
#

does anyone know how to write something in pygame with interlines? like if i have \n in pygame it anyway write it all on the same line

twilit geode
#

but Ill fix that later

#

for now this works

#

also

public Map<String, Team_Event_Status> getTeamEventStatusForYear(String teamKey, int year) throws IOException {
            Request req = new Request.Builder().url(url+"team/"+teamKey+"/events/"+year+"/statuses").addHeader(readAuthTokenId, readAuthToken).addHeader("Last-Modified", lastModified).build();
            
            Response rsp = client.newCall(req).execute();

            Type tesMapType = new TypeToken<Map<String, Team_Event_Status>>() {}.getType();
            Map<String, Team_Event_Status> keys = new Gson().fromJson(rsp.body().string(), tesMapType);
            lastModified = rsp.headers().get("Last-Modified");

            return keys;
        }
#

ew

#

thats alot of yucky long lines

lyric mountain
#

please, use proper naming KEKW

twilit geode
#

how so

lyric mountain
#

int thisIsAVariable
class ThisClass
project my-own-project

twilit geode
#

yes ik; the schemas were snake cassed

#

so I just coppied it; I will change

#

but with vscode its easy just press f2, so im just gonna get it working now

lyric mountain
#

also you dont need long method names, like

twilit geode
#

yes

twilit geode
lyric mountain
#

it saves time typing it later on

twilit geode
#

ok

lyric mountain
#

btw

twilit geode
#

what tf would you change that to

lyric mountain
#

did u just start using gson or is that a rooted dependency?

twilit geode
#

hm?

lyric mountain
#

like

twilit geode
#
<dependencies>
    <!-- OkHttp -->
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp</artifactId>
      <version>4.0.1</version>
    </dependency>
    <!-- Google JSON -->
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.8.7</version>
    </dependency>
  </dependencies>
lyric mountain
#

no, I mean

#

do you use it everywhere or is that your first usage?

twilit geode
#

uhh

#

3rd?

#

my first large usage

lyric mountain
#

there's another thats a lot more performant than gson

#

Moshi

twilit geode
#

besides turning gifs into 1gb json files

#

ok

#

but I like gson

lyric mountain
#

it's forked from the gson repo and was heavily optimized

twilit geode
#

ok

lyric mountain
#

(and reduced a ton of boilerplate)

twilit geode
#

but I like gson

lyric mountain
#

well, ok

twilit geode
#

lol

lyric mountain
#

just don't try to use java records then

#

they wont work

twilit geode
#

I dont know what that is so I think were clear

lyric mountain
#

that's what everyone says

twilit geode
#

until they need them

lyric mountain
#

later on it becomes hell to switch libs

twilit geode
#

not my problem 😆

lyric mountain
#

for now

fallen holly
#

how do i set bot pfp on message embed thumbnail

sudden geyser
#

depends on the library you're using

distant cobalt
#
        if (guild.member(memberId)) {
                  ^

TypeError: Cannot read property 'member' of undefined```

```js
client.on('guildMemberAdd', member => {
    let guild = client.guilds.cache.get('828686676355973190');
    memberId = member.id;

    if(member.guild.id === "854035267399712788"){
        if (guild.member(memberId)) {
            console.log('hi')
        }
        else{
            member.kick()
        }
    }

    
})``` I'm trying to check if that user is in a certain server. But it doesn't work?
earnest phoenix
#

guild is undefined

#

So that means the guild you are trying to get doesn't exist in the cache or even at all

split hazel
#

whats even the point of that script

#

of the line guild.member

#

you already have the member object

#

and fyi it's going to be removed in v13 if it wasnt already

earnest phoenix
fallen holly
#

is there a way that i can make a automatically make a channel if the sever does not have one

#

without running a command it will do it by it self

fallen holly
#

yea

drifting shell
fallen holly
#

if it is not createRole what is it

solemn latch
#

you cant just randomly try stuff like that

#

you should look at the documentation on how to create roles.

#

trying random stuff like "Guild#createRole" makes no sense when they provide all that information to you

earnest phoenix
#

You gotta go through the manage now iirc

twilit geode
fallen holly
#

i thought i fixed it but it did not work

#

😭

drifting shell
#

Didn’t work doesn’t help anyone help you

fallen holly
#

??

pale vessel
#

He's trying to say saying "didn't work" won't help us either since we wouldn't know what the problem is

#

So be more helpful

fallen holly
#

so i'm trying to make a advance mute command. If the sever does not have a mute role the bot will make the role. so i added this

guild.roles.create({
  data: {
    name: 'Muted',
    color: 'GREY',
  },
  reason: 'Server Does not have arole
'
})
  .then(console.log)
  .catch(console.error);
#

from the dj website and it was showing guild is not defined
added

const guild = message.guild.name

then it was like can not read property of create is not defined and don't know how to fix that

drifting shell
#

guild isn't defined

#

which means that guild does not have a value

#

so guild needs to come from something

#

you really should learn javascript before making a bot

latent heron
#

@sudden geyser would it be better to use a Box<String> instead of Vec<String> if I want to store a long array of Strings when converting JSON?

sudden geyser
#

Box<String> is for storing data on the heap in certain occasions. Strings are already stored on the heap to my knowledge.

#

If you want to store a list of strings, Vec<String> is the standard.

latent heron
#

Well so far I'm using a union for multiple types and then going impl for the struct

#

Since JSON can do string, bool, float and int

#

Or Is there an easier way of just doing that?

sudden geyser
#

The union type?

#

Or a type that acts as a union (e.g. an enum containing all the types allowed)

latent heron
#

Type

#

Is there a type that acts like one though?

#

Idk if I can nest types with Vec

#

Can you do Vec<String, u64, f32, bool>?

sudden geyser
#

Are you trying to write your own variant of the serde library?

latent heron
#

Nah

#

But I don't wanna use serde personally

#

Although if there's a good solution with it, I'm down to hear

#

Consider me very amateur rust dev laugh

sudden geyser
#

Nah you're pretty good for a beginner

latent heron
#

Ahh thank you 😊

#

Been studying the rust docs on all of this

#

Fuckin christ you didn't even blink @scenic kelp

scenic kelp
#

huh

sudden geyser
# latent heron Although if there's a good solution with it, I'm down to hear

the reason to use a popular library is because it's popular (as you can infer). For example, serde already has serialization and deserialization for most data types people can think of (and yes, JSON).

Though, about your Vec<String, u64, f32, bool> concern, you can't use Vec like that since it takes a single type. I'm a bit confused on what you want to do. Do you want Vec to accept any of those four types in the collection? If so, you can use an enum to represent the suitable types. If you want a struct with those four types, just define a struct with the appropriate fields.

latent heron
#

Yeah

#

In python there is a Union[] type which does this

#

I want to do the same but in rust

cedar wave
#

Is it possible to make a music bot that can sit in the afk channel of a server and play music from a youtube 24/7 stream? If so, does anyone know of an open source one that already exists? (I don't have much programming knowledge lol)

sudden geyser
sudden geyser
#

To understand it, you should stimulate your programming experience

latent heron
#

Would I just set it up as like this?

pub enum JSON
{
  b: Vec<bool>,
  s: Vec<String>,
  u: Vec<u64>
}
#

And then do like

#
pub struct JSON
{
  value: JSON
}
#

Sorry enums use consts I think

#

But the main premise?

sudden geyser
#

It would look more like this:

enum Value {
    Null,
    Bool(bool),
    Number(Number),
    String(String),
    Array(Vec<Value>),
    Object(Map<String, Value>),
}

In this example, Value represents any value in a JSON that would be associated with a key. The premise is correct.

latent heron
#

I see

#

And i can just refer to the enum base in the struct

#

Since I don't need to specify an enum value from it itself

sudden geyser
#

yes

latent heron
#

Pog, ok I think i understand it now

tulip cradle
#

Is it possible to write something in about me in bot? scarring

open elbow
#

maybe in future you can, not sure

opal plank
marble juniper
#

lol

opal plank
marble juniper
#

they will probably support it soon tm

#

sad

opal plank
#

they wont

#

theres no current plans to add that

marble juniper
#

sad

opal plank
#

take it as a "CUSTOM_PRESENCE" thing

marble juniper
#

stuck with "playing x" it seems

#

lol

opal plank
#

why bots cant use custom prenseces like us

#

aka rich presence

sick agate
#

Like why not

opal plank
sick agate
quiet pawn
#

any ideas on how to fix high ping

#

ignore ram btw i run 3 bots on 1 vps

#

ignroe cpu also

zinc wharf
#

Get better internet

quiet pawn
#

lol

#

that makes no sense

#

its on a vps

zinc wharf
#

Then your vps provider is dreadful OMEGAlul

quiet pawn
#

well

#

im only person that gets it

#

lol

#

outta everyone ik that uses galaxygate

#

they are all py tho

prime mist
quiet pawn
#

LA

prime mist
#

And where are you located? It will depend on the distance between the data center your guild is using and the server for your bot.

quiet pawn
#

im in canada

#

ontario to be more direct

#

also i just looked again

#

my vps server is in new york

#

so im only like

#

less then 2 hours away

#

drive ofc

lusty quest
lusty quest
#

lol i get a Better ping from Helsinki, Norway and the API Server is in San Francisco

quiet pawn
#

idk why its like that

#

no one ik is getting the issue

#

it just randomly started

#

no errors on vps or in bot log

lusty quest
#

maybe shitty host, or a noisy neighbor

quiet pawn
#

it just jumped from av 40 - 100 to av 1k plus

quiet pawn
#

with av 40 - 100

#

2 are same base in new york

lusty quest
#

possible that you are on a Host with one other guy who decides to run Plex on his VPS and decides to stream 4k videos all day long

#

did you asked the Support of your hoster bcs of this?

#

they maybe can help you

quiet pawn
#

yea

#

its not them either

#

there fine

#

this issue was a thing like 2 months ago

lusty quest
#

or they are just shit and overprovisioned the hell out of the Hardware/Aviable Bandwith

quiet pawn
#

but as been perm fxed

#

it was a cloudflare issue with them

#

for a bit

#

but it was fixed like 4+ weeks ago

lusty quest
#

hmm

#

if doubt use a different host

quiet pawn
#

well

#

damn

#

lol

#

back to heroku

lusty quest
#

lol no

quiet pawn
#

well

#

it was better

#

way better

#

never had issues

lusty quest
#

just use a host with good rep

#

like Linode, DO, GG,AWS,Google

quiet pawn
#

only reason i moved to a proper vps is because i wanted to uise a db

#

but i stooped using it anyways

lusty quest
#

why?

#

having a proper DB is the best thing

quiet pawn
#

because the bot was crashing

#

mongoose is ass

lusty quest
#

lol you just used it wrong

quiet pawn
#

it was for a eco thing but i gave up dealing with mongoose

lusty quest
#

if it crashes bcs of a DB, you either do bad queries, or dont handle errors properly

quiet pawn
#

it would be find for like 3 months

#

then mongoose would just

#

crah my bot

#

over and over again

#

for no reason

lusty quest
#

yea sounds like query issues

quiet pawn
#

lol

lusty quest
#

like ive used MongoDB for ~6Months and had like 1 or 2 Crashes bcs of bad error handling

quiet pawn
#

i gave up on mongo

lusty quest
#

then use Postgres

quiet pawn
#

worst db i have ever used

lusty quest
#

lol

quiet pawn
#

i have already deleted everything for my eco stuff

lusty quest
#

mongo is fine, just the docs are special

quiet pawn
#

so is waht it is

wheat mesa
#

Don’t diss Postgres

#

Overkill for small things but overall great db

lusty quest
#

lol if you want to go overkill use Cassandra

earnest phoenix
#

Oh god Cassandra

#

I haven't used it but I heard its a nightmare to use

lusty quest
#

not really a nightmare, but overkill for most small projects

earnest phoenix
#

I might look into it

#

Currently I use postgres and while the project isn't big I hope it becomes big mmLol

lusty quest
#

discord uses Cassandra bcs MongoDB where unable to handle the load

earnest phoenix
#

Ofc

#

Mongodb bad /s

lusty quest
#

it worked for the first 1-2 years tho

earnest phoenix
#

Cassandras syntax is weird

#

What is a keyspace never heard of it

lusty quest
#

idk never used Cassandra

quiet pawn
#

damn

tired panther
#

WHats the regex expression for the character*?

earnest phoenix
#

Escape it

sick jackal
#

ok so... testing my bot . very good

opal plank
earnest phoenix
#

Any one pls suggest me new command

#

Of bot

opal plank
earnest phoenix
opal plank
opal plank
#

unless you scaling, you wont need it

hot schooner
#

This is not working for my bot, what I need to do?

#

Like I want to change it;s status to "watching rofrosam" but it aint working.

opal plank
#

u cant use CUSTOM_STATUS
t

#

thats only for users

#

use WATCHING/LISTENING, etc

hot schooner
#

ok

crimson vapor
opal plank
#

bet you wont

crimson vapor
#

ugh okay

#

L all it did was restart my bot

long crow
#

toying around with the new @discordjs/voice package

static trench
#

hello, im trying to make a bot in python thats multi files. is there any easy way of doing that?

#

because everything i try doesnt seem to work

slender thistle
static trench
#

wdym

opaque acorn
#
(node:22855) [DEP0128] DeprecationWarning: Invalid 'main' field in '/app/package.json' of 'node index.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
#

?

static trench
#

@slender thistle imma look at extensions

slender thistle
#

Aka the commands extension

#

It supports cogs

static trench
#

ya

#

cogs are confusing imo

slender thistle
#

They're just classes containing commands and listeners

static trench
#

ya

split hazel
#

tfw you have to use a library to easily use multiple files in python

earnest phoenix
#

KEKW Not that you can't without a lib

tired panther
#

Can you delete messages through console.log ?

restive furnace
#

print ansi escape stuff

sudden geyser
tired panther
sudden geyser
#

While you probably could, you should let the console serve its purpose of logging stuff. I'd rather use log levels to tell the logger what kind of messages to log, but that's not the same as what you're asking for.

solemn latch
#

console can be an input

#

but yeah, really you should be building something separate if you need to access your program like that.

terse ingot
opal plank
#

if you dont know, dont answer

#

dont just randomly give guests

last geyser
#

What's the purpose of a <lang>.typed file? The ones I've seen are literally empty and I've never actually seen any explanation of them

earnest phoenix
#

Here's what shows up in gparted from the usb

quartz kindle
#

just initialize it as a new partition and format it

earnest phoenix
#

How?

quartz kindle
#

delete it

#

then create it again

earnest phoenix
#

Deleted then made a new one

solar cave
#

pls help

earnest phoenix
#

I hope i selected the correct file system

quartz kindle
#

yes ext4 is fine for linux

earnest phoenix
#

cool

earnest phoenix
quartz kindle
#

you can also boot from the ubuntu installer and have ubuntu format it for you with whatever file system it prefers

#

which is probably gonna be ext4 anyway

earnest phoenix
#

tried and failed because i cannot switch mouse buttons from the ubuntu installer

quartz kindle
#

wut

#

lmao

last geyser
earnest phoenix
#

My left click button is broken

quartz kindle
#

what about keyboard?

#

doesnt ubuntu have accessibility options?

earnest phoenix
#

Anyways do I need to rename the partition?

quartz kindle
#

just name it anything you want

earnest phoenix
#

id rather keep it as sda4

quartz kindle
#

its just a name

#

it will still be sda4 no matter what you name it

earnest phoenix
#

ok

#

so do i just save everything and try to install ubuntu to the new partition?

solar cave
#

@earnest phoenixhow can i send custom emoji

earnest phoenix
#

@solar cave type \:emoji: in your discord server and then copy what it shows

restive furnace
earnest phoenix
#

my friends usb might melt

solar cave
#

i have tried this

earnest phoenix
#

@solar cave put the copied text inside your message

solar cave
#

ctx.channel.send(str(emoji))

earnest phoenix
#

why would you convert a string to string

solar cave
#

lets say one custom emoji name in my server is "emoji_14"

#

and the bot is in my server

#

i can grab that emoji id too

#

say emoji.id="XXXXXXXXX"

earnest phoenix
#

type :emoji: in your server
copy what it shows
then ctx.channel.send("(copied text) rest of the message")

solar cave
#

what about different server?

earnest phoenix
#

You'll need use external emojis permission

solar cave
#

then?

earnest phoenix
#

You can use the emoji after that

#

@quartz kindle

#

This error also popped up when i tried to create a new partition directly from the installer

restive furnace
#

use gparted

earnest phoenix
#

Already did the partition stuff

#

Now it's giving me an error when im installing

#

uwu whats this

solar cave
#

@earnest phoenixbro i tried this

#

@client.command(pass_context=True)
async def emoji(ctx):
await ctx.channel.send(":3809discordhypesquad:")

earnest phoenix
#

why did you remove the <>

restive furnace
solar cave
#

3809discordhypesquad this emoji is in my server

#

bot is aslo there in my server

earnest phoenix
solar cave
#

i invited bot to other server which emoji is not there