#development

1 messages · Page 738 of 1

hollow saddle
#

no 🤦

#

Do you know how to program

outer niche
#

Yes I don't have a program on python anymore so I don't really remember much

hollow saddle
#

Also, I may be wrong cause again I don't know python very well so just follow the tools given to you by dbl https://top.gg/api/docs#pylib

outer niche
#

Ok

outer niche
#

I'm confused on the install part

vital lark
#

that's installing the source

#

there should be an example usage

outer niche
#

Yeah I saw the example that example actually helped me out a lot I'm just confused on the install like dodgers use the PIP install part

raven axle
#

Does someone know a fix or why this is happening? when I start my bot up it crashes when it logs in using the token, the error message: Error addinforole ENOTFOUND discordapp.com at getAddrInfoReqWrap.onlookup

sudden geyser
#

maybe your internet died

#

how are you connecting

raven axle
#

Just thru wifi

earnest phoenix
#

then your wifi connection is breaking up

#

wifi isn't stable enough for hosting

raven axle
#

Ye I think thats the case, I tried connecting to google and it took like 20secs lol

#

My wifi sucks xd

#

Anyway, thanks guys for the help

formal vine
#

How frowned upon is it to ask questions about DBM here

undone rose
#

It's not frowned upon @formal vine but don't expect help

formal vine
#

Gotchu lol

loud salmon
#

like maybe 1 person has used it

undone rose
#

DBM is not really coding and we're developers so the best place to look is DBM's Discord

loud salmon
#

that is active here

earnest phoenix
#

Is there a d.js sharding tutorial anywhere

vital lark
earnest phoenix
#

Thank you

vital lark
#

no problem AlbaSalute

steel cloak
#

in discord.js is there a way to get the User object by a users ID?

vital lark
#

by using <Client>.users.get where <Client> is your client

steel cloak
#

ahh okay thanks a lot!

earnest phoenix
#

Dude

#

It's const Discord RichEmbed()

mossy vine
#

???

earnest phoenix
#

I had made a mistake in the embeds so

hasty bridge
#

Does anyone know of a way to transfer reactions from one message to another?

#

I'm building a bot which has to delete a message and recreate it, and I'm trying to figure out if I can bring along the reactions with it

mossy vine
#

@earnest phoenix thats invalid code lol

#

@hasty bridge you cant add reactions as other users

hasty bridge
#

Eh, I figured...

mossy vine
#

the best you can do is add 1 of each reaction on the message (assuming your bot can access the custom emojis used)

hasty bridge
#

Mmhmm

#

But that wouldn't accomplish much more than just not adding the emojis in the first place pensivecowboy

#

Oh well

mossy vine
#

practically no

hasty bridge
#

Thanks for the quick answer!

#

I appreciate it

earnest phoenix
#

@mossy vine that works for me lol

mossy vine
#

@hasty bridge actually, it you are willing to put in the effort, you could render an image with the reactions and their amounts, and use it as an attachment

#

but knowing who were the people who originally posted those reactions is not possible with an image

haughty mica
mossy vine
#

define variables for the counts and write a function for handling the member object and run filter once

lament meteor
#

and try to avoid var imo

compact oriole
#

use const or let xd

#

and also you should use the embed builder:

#

new Discord.RichEmbed()

vital lark
#

it's not needed

#

but it's a good utility

compact oriole
#

its just nice

#

yea

earnest phoenix
#

hey guys how shall i mention the command author and the avatar in the embed

#

if (message.content === '!embed') { const Embed = new Discord.RichEmbed() .setTitle('Test Embed') .setAuthor('Some Rome ', 'https://i.imgur.com/wSTFkRM.png', 'https://discord.js.org') .setColor('0x7289da') .setDescription('Hello this is a test embed') message.channel.sendEmbed);

#

then?

serene zenith
#

if you want to mention someone you could use ${message.author} and for the image you could use .setImage(message.author.avatarURL)

mossy vine
#

oh god there is so much wrong with that code

earnest phoenix
#

Not mention

#

I just want the author name

summer torrent
#

message.author.username

small prairie
#

.setparent Isnt WOrking Discord.js
Error

TypeError: channel.setParent is not a function
modest maple
#

read the error

#

.setparent is not a function

#

ergo, you cant dochannel.setParent

small prairie
#

channel.setParent('650678889663954965')

#

This Is My Code

#

Channel defined btw

modest maple
#

channel.setParent is not a function

#

.setparent isnt a function in your code apparently

mossy vine
#

what version are you on

#

stable or master

small prairie
#

Stable i guess

mossy vine
#

how do you define channel

small prairie
#

It worked When i used channel.deelte

#

delete*

#

Oh a sec My finding channel Method Is decrepted

mossy vine
#

but how do you define channel 😩

small prairie
#

var Channel= message.guild.channels.find(c=>c.id=='644539932622323712')

#

Rip off of role /:

mossy vine
#

bot.getChannel waitWhat

sudden geyser
#

That's Eris

#

well maybe a custom function

mossy vine
#

he said he is using d.js

sudden geyser
#

weird.

#

custom function or it straight up doesn't exist

mossy vine
#

or just copying code

steel heath
#

@bitter sundial

#

good deal

#

wanna buy?

vital lark
#

@agile idol yes

sudden geyser
#

ok they're gone

steel heath
#

🦀 s

opaque eagle
#

Has anyone managed to get process.binding() working in TypeScript without using // @ts-ignore

vital lark
#

I don't think they have Process#binding in the types

#

if you know what it returns, maybe add an declaration file

opaque eagle
#

but what would the module name be

steel heath
#

what if

#

process.binding("util") as any

#

thats all i know about ts :^)

#

and works pretty much fine for anything i do

opaque eagle
#

this works (process as any).binding("util");

#

but i'd still like a neater solution

steel heath
#

meh

vital lark
#

hm

opaque eagle
#

so i tried to mimic it

vital lark
#

@opaque eagle which version are u using for @types/node

opaque eagle
#

^12.0.8

vital lark
#

hmm

#

12.12+ uses declare module instead of namespaces

#

so i think you can do declare module 'process' and add it there

opaque eagle
#

also im using node v13.2.0

#

does the node version and typings version have to match up

vital lark
#

not nessisarly

#

but it's recommended

#

I don't think they have types for v13

outer niche
#

Can someone help me with this I am running this for discord bots is seeming to have a problem somewhere that I cannot figure out because it is not throwing any error code but it is also not updating on their website


    def __init__(self, bot):
        self.bot = bot
        self.token = 'DBLtoken'
        self.dblpy = dbl.Client(self.bot, self.token)
        self.updating = self.bot.loop.create_task(self.update_stats())

    async def update_stats(self):
        while not self.bot.is_closed():
            logger.info('Attempting to post server count')
            try:
                await self.dblpy.post_guild_count()
                logger.info('Posted server count ({})'.format(self.dblpy.guild_count()))
            except Exception as e:
                logger.exception('Failed to post server count\n{}: {}'.format(type(e).__name__, e))
            await asyncio.sleep(1800)

def setup(bot):
    global logger
    logger = logging.getLogger('bot')```
slender thistle
#

Are you putting that into your main file or a cog

outer niche
#

my mane file with all the uther code

slender thistle
#

That's a code for cogs

outer niche
#

so i need to put it in cogs

slender thistle
#

Either that or convert it to a code that can be executed in a main file

outer niche
#

How would I transform it to work in the Main file

#

Or would it be easier to put in the cogs file

slender thistle
#

Does your bot use cogs

outer niche
#

Nope

modest maple
#

is you bot C+P

outer niche
#

I do not even know what that is but I'm just going to transform it to work in the main file

slender thistle
#

It's really simple

outer niche
#

The transformer for the main file

opaque eagle
#

Can GitHub Actions modify my files? For example, my project is a REST API, and I want my bot to gather info on some endpoints and add it to README.md

#

or could it go through all my command objects and get its descriptions and put it into the readme

#

(command objects are in a rest api already)

outer niche
#

@slender thistle what would need to be changed to it be convert into the main file

slender thistle
#

The init part being rewritten a bit and the references to the class

#

Other than that really nothing

outer niche
#

So I just need to rewrite the reference to the class

slender thistle
#

Did you miss the init part

#

Well technically yeah, you won't have a class

#

Anything related to a class is removed when converting it to "non-class" code

outer niche
#

    def __init__(self, bot):
        self.bot = bot
        self.token = 'DBLtoken'
        self.dblpy = dbl.Client(self.bot, self.token)
        self.updating = self.bot.loop.create_task(self.update_stats())```
#

So basically I need to take out all that

slender thistle
#

Where are you gonna create an instance of DBLClient

outer niche
#

So do I just take out the wine where it says class

slender thistle
#

Have you learned basic Python

#

Do you know how __init__ works

outer niche
#

Yes it has a reverse method

spring ember
#

__init__ is the constructor

dire abyss
amber fractal
#

probably find just the one?

#

I mean this seems like it has no query selector

dire abyss
#

@amber fractal nonono, i mean i want to find all the clans but i want the answers seperate so like this: "clanname":{"totalcrystals": 49694} for all clans so i can sort through them and make a database

fluid basin
#

make another variable (preferably using another object) to store the clan values after calculating them in your second for loop?

dire abyss
#

@fluid basin wdym expand on that, cuse sorry but i hate loops so a little explaining would be great 🥰

fluid basin
#

well you can look at line 10 from the code you sent

#

there is a for loop which loops through each member

#

so after fetching the value in the database

#

add it to another variable that is for the clan count

#

I do see that you have a map lying around at line 3, I suppose you want to use the map to store the values for each clan?

late hill
#

You can remove the empty exec() methods, shouldn't change anything to your code execution.
As for why it displays the total of all clans, shouldn't be very hard to understand.
You're using a nested for loop where you're looping through all members of all clans.
You simply have to reset the value each time you start looping through members of a new clan, and at the end of the members loop, you'll have the value you're looking for.

#

That value can then simply be stored in your Map for example

#

Mongo also has an $in operator which you can use in queries to check if a field contains a value in a certain array, you could use that so it would only take you 1 query to fetch all members of a clan.

amber fractal
#

why

#

You don't need to ping someone 3 times, or randomly ping people at all for that matter

earnest phoenix
#

:V

slender thistle
#

You don't need to spam

outer niche
#

How do you define this

slender thistle
#

wdym how to define

outer niche
#

Like you put def but where

fluid basin
#

ehh import the library?

#

afaik

modest maple
#

what

#

@outer niche how much programming experience have you got in python?

oblique ember
modest maple
#

its not

oblique ember
#

now its running again

#

mhhh

dire abyss
#

@late hill wait how would u use $in to get all members of a clan?

late hill
#

{_id: {$in: memberarraya}}

#

should work

opaque eagle
#

(JavaScript) Is there a one-liner to insert something to every second item of an array?
Like: ['a', 'b', 'c', 'd', 'e'] would become ['a', 'b', null, 'c', 'd', null, 'e'] for example

#

I'm currently doing it with a for loop, but i wonder if it can be done in one line

quartz kindle
#

you can do it with a reduce

#

but that would be basically creating a new array

#

not sure how that performs against reindexing an array multiple times

opaque eagle
#

Okay

#

the method isn't even static or anything

valid frigate
#

huh weird

#

pretty sure you don't need to define a generic type

#

wait nvm i see

opaque eagle
#

okay, lots to update on

#

I moved the chunk function out of the class and just made it a global, standalone function

#

then realized it was recursive and i had no stop condition so it would reach the max call stack size

#

then fixed the function and now it works

earnest phoenix
#

Looking for help writing an ear rape detector.

#

my current algorithm calculates the amplitude average and the dynamic range average and attempts to use that, but either my algorithm is wrong, or that's just not a good enough measurement to detect ear rape

#

lower dynamic range = more compression = more likely to be ear rape

#

(same colors)

valid frigate
#

no solid answers but it looks like it would be extremely difficult

#

if the earrape matched the same db as human speech it wouldn't be possible to differentiate the two since they're equally as loud

#

what i do notice in your first graph is how the earrape seems to fluctuate a lot less though

earnest phoenix
#

well I had this idea about "what is ear rape?"

#
loud, decibels
heavy compression
sustained over time
occurs while others are talking
valid frigate
#

i mean the red line seems to have a smaller max/min

earnest phoenix
#

right, smaller dynamic range

#

but look at the scale

valid frigate
#

yeah

#

hmmm

earnest phoenix
#

the difference is 0.0001 to 0.0002

#

it's tiny tiny

#

this is a float 0-1

valid frigate
#

ah

#

earrape tends to sound "static"

#

dunno how that would be graphed

modest maple
#

might be easier to apply certain audio manipulations onto it to change the gain of static noises

earnest phoenix
#

hm?

valid frigate
#

that would just increase the amount of computation that a bot requires and probably doesn't scale well

granite tartan
#

anyone here knows haskell?

west raptor
#

ive been wanting to learn it

quartz hawk
#

someone tell me why this isnt working
<link rel="stylesheet" href="../style.css">
why is not this working

#

it works for paragraph only

floral stone
#

What's the full folder outlook

quartz hawk
#

idk why

#

the full folder?

floral stone
#

is the style.css in the same folder

quartz hawk
#

yes

floral stone
#

remove ../

quartz hawk
#

ok

#

keeps the same

#

paragraph can have a css style thing but button doesnt

floral stone
#

Clear cache? Is the button css correct?

quartz hawk
#

thats all css i have

#

p works but class="startButton" doesnt

#

i also tried button {} but also doesnt

floral stone
#

Html code, plz.

quartz hawk
#

ok

floral stone
#

And view the source of the page, is the html page properly updated?

#

You didn't import the css in the html.

quartz hawk
#

well i'm using vscode go live extension

#

i did

#

<link rel="stylesheet" href="style.css">

floral stone
#

It should be in the head tag

quartz hawk
#

oh

#

still nothing

#

only paragraph works

floral stone
#

For the button, use this:

#

button::-moz-focus-inner.btnBlue{ Styles go here }

button:hover.btnBlue,button:focus.btnBlue{ styles go here }

button:active.btnBlue{ Styles go here }```
quartz hawk
#

alright

#

ok so there is probably something wrong that i wrote that i have no idea because nothing is working anymore

floral stone
#

Screenshot?

quartz hawk
#

of the html code or css?

floral stone
#

What you changed

quartz hawk
#

what i did was basically create another css file and try to put only the button in there because i am stuped

#

but i also tried what the dude on stackoverflow tried

floral stone
#

Why tf would you do that

quartz hawk
#

because i have absolutely no idea what is even happening anymore

floral stone
#

it should be css .startButton button { background-color: #ffffff; }

quartz hawk
#

n o t h i n g

floral stone
#

Do inspect element

quartz hawk
#

.startButton button {
font: 20px Arial;;
width: 50px;
height: 30px;
background-color: #006994
}

<button type="button" class="startButton">A</button>

#

ok

floral stone
#

click the button

quartz hawk
#

and?

floral stone
#

Do inspect element, click the "select an element button", and see what it shows on styles.

quartz hawk
floral stone
#

good

quartz hawk
#

what is even going on this is completely different than the css i put to it

floral stone
#

it should be css button.startButton { background-color: #ffffff; }

quartz hawk
#

k

floral stone
#

As shown in the image

quartz hawk
#

just changed it and its the same

floral stone
#

Overrite it

#

using !important

#

it should be css button.startButton { background-color: #ffffff; !important }

quartz hawk
#

still nothing

floral stone
#

but important before the ;

#

my bad

quartz hawk
#

oh ok

#

bruh what is going on there is still absolutely 0 changes

floral stone
#

What's your code?

quartz hawk
#

css?

#

button.startButton {
background-color: #006994 !important;
}

floral stone
#

and html

quartz hawk
#

<!DOCTYPE html>
<html lang="en">
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<head>
<title>thing</title>
<script></script>
<link href='style.css' rel='stylesheet'>
</head>
<body>
<canvas id="mainC" style="width: 500px; height: 300px; border: 2px solid blueviolet"></canvas>
<br>
<button type="button" class="startButton">A</button>
<p>Hello.</p>
</body>
</html>

floral stone
#

What browser are you working? Does it work on chrome?

quartz hawk
#

i'm using brave

#

let me test on chrome

#

it remains the same as brave

#

like,

#

p {} works but somehow

#

when i try to use any other css it doesnt

#

that is what i dont understand in any way possible

#

.

#

ASIODHZXUICFSUDGS

#

a simple semicolon

#

i just wasted all of your time because of me

#

i'm sorry

floral stone
#

This is what I use on my website:

CSS: ``` input[type=submit], button {
background-color: #2E2E2E;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
transition: all 0.3s ease 0s;

}```

HTML ```html
<form action=/pickchar method=post>
<input type=text name=char required>
<input type=submit value=Submit></form>

#

OH SHOOT

#

OK

quartz hawk
#

I AM SOF UCING MAD

floral stone
#

IT'S FINE

quartz hawk
#

I APOLOGISE

floral stone
#

U GUD

quartz hawk
#

i also apologise for the capslock

floral stone
#

same

quartz hawk
#

it was a semicolon after the final brackets of paragraph

#

;_;

sudden geyser
#

debugging in css SGScared

floral stone
#

XD

#

Life is hell and we all deserve it.

modest maple
#
file = discord.File(r"C:\Users\ChillFish8\Documents\MENACE/Test1.png",
                                    filename="Test1.png")
                embed = discord.Embed(title=f"The Board", description=f"Lets get playing!", color=Colour)
                embed.set_image(url="attachment://Test1.png")
                await LastSentMessage.edit(file=file, embed=embed)```

so.... we have this code
#

and then we have the error

floral stone
#

You got me open up sftp connections on my mobile hotspot.

modest maple
#
Ignoring exception in on_message
Traceback (most recent call last):
  File "C:\Users\ChillFish8\AppData\Roaming\Python\Python37\site-packages\discord\client.py", line 270, in _run_event
    await coro(*args, **kwargs)
  File "C:/Users/ChillFish8/Documents/MENACE/MENACE.py", line 61, in on_message
    await Selector.Pager(message.channel, message.author.id, client, Colour)
  File "C:\Users\ChillFish8\Documents\MENACE\Selector.py", line 69, in Pager
    await LastSentMessage.edit(file=file, embed=embed)
  File "C:\Users\ChillFish8\AppData\Roaming\Python\Python37\site-packages\discord\message.py", line 744, in edit
    data = await self._state.http.edit_message(self.channel.id, self.id, **fields)
  File "C:\Users\ChillFish8\AppData\Roaming\Python\Python37\site-packages\discord\http.py", line 129, in request
    kwargs['data'] = utils.to_json(kwargs.pop('json'))
  File "C:\Users\ChillFish8\AppData\Roaming\Python\Python37\site-packages\discord\utils.py", line 303, in to_json
    return json.dumps(obj, separators=(',', ':'), ensure_ascii=True)
  File "C:\Users\ChillFish8\AppData\Local\Programs\Python\Python37\lib\json\__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "C:\Users\ChillFish8\AppData\Local\Programs\Python\Python37\lib\json\encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "C:\Users\ChillFish8\AppData\Local\Programs\Python\Python37\lib\json\encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "C:\Users\ChillFish8\AppData\Local\Programs\Python\Python37\lib\json\encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type File is not JSON serializable
slender thistle
#

Is posting files with embeds at the same time possible, I forgot

floral stone
#

It is

#

I do it

#

But you have to post bytes,I thought

modest maple
#

it works for innkeeper

#

but not menace

floral stone
#

That is what I do, atleast.

modest maple
#

idek why

floral stone
#

Why do the strings in Embed = have f in front of them

#

Remove them and try again

modest maple
#

cuz its formatting a string

#

it doesnt matter

floral stone
#

There's no formatting.

modest maple
#

f strings is just letting the string be formatted if possible

floral stone
#

Ah ok

#

It's a problem with the file

#

anyways

modest maple
#

idek why its not liking a .png

floral stone
#

I'm looking up my code and compare it, hold on

slender thistle
modest maple
#

like

#
await LastSentMessage.edit(file=file, embed=EmbedList[Tab])```
floral stone
#

file=discord.File(BytesIO(path), filename="hp.png"))

slender thistle
#

The f in python3.6+ is for f-strings

modest maple
#

is innkeepers code

#

file = discord.File(r"C:\Users\ChillFish8\Documents\MENACE/Test1.png",
                                    filename="Test1.png")
                embed = discord.Embed(title="The Board", description="Lets get playing!", color=Colour)
                embed.set_image(url="attachment://Test1.png")
                await LastSentMessage.edit(file=file, embed=embed)```
#

is menace

slender thistle
#

It worked for me without fucking around with bytes directly

modest maple
#

yh

slender thistle
#

Unless images are special

modest maple
#

its working for menac

#

no sorry

#

i mean

floral stone
#

I don't think you can edit a file

modest maple
#

its working for inkeeper

#

and no it just edits the embed

#

but the file can get changed

slender thistle
#

Doubtful

floral stone
#

The slashes in the file

#

there's one that goes like \ and one that goes like /

slender thistle
#

They don't matter

floral stone
#

Ah ok

#

Are you using the same discord version :/

slender thistle
#

I'm using relative path and it's erroring out for me too

floral stone
#

Have you tried opening the file, getting the bytes, and sending the bytes instead?

modest maple
#

both bots r using d.py 1.2.5

#

both work of identical systems

floral stone
#

from io import BytesIO

modest maple
#

both work off identical message handlers just one has a list of embeds to select from

slender thistle
#

file arg isn't mentioned in dpy docs

floral stone
#

I usually get the bytes of a file, tbh.

slender thistle
#

It works with discord.File

#

and the first arg of that being filename

earnest phoenix
#

I got trolled off of the discord.js server for preferring es6 over ts

floral stone
#
from io import BytesIO
import base64

def get_bytes(path):
    with open(path, "rb") as image:
        x = base64.b64encode(image.read())
        #or x = image.read() 
    return x

def get_file():
    path = "source of image"
    by = get_bytes(path)
    file= discord.File(BytesIO(path), filename="hp.png") #Uses bytes to display images
    return file
    
#

@modest maple Try this bby ❤️

#

Sorry, code fixed.

#

Hopefully, you could get the file bytes and send it like that.

modest maple
#

we still getting the same issue

#

:/

#

might check it tomorrow

#

ya never know xD

floral stone
#

it could be the file path

#

that's what I'm betting on

#

try removing the r in front, idk

#

@modest maple

#

@slender thistle's examples didn't have an r in front

modest maple
#

its an r string

slender thistle
#

the r helps the backslashes to not fuck up

modest maple
#

becuase of \

#

got bigger bugs to fix atm tho

slender thistle
#

Python string formatting gang BlobCool

modest maple
#

innkeeper has a rather big error going on rn

floral stone
#

alrighty then

modest maple
#

we started no handling 10GB/s very efficently

#

it is fixed now atleast

radiant jay
#

@slender thistle .format or f strings

slender thistle
#

f strings all the way

#

More performant and more readable

modest maple
#

^^

#

atho saying that

#

i have to us =? for SQL

#

to stop SQL injection attacks

radiant jay
#

@slender thistle hell yes (except lang files sadly)

slender thistle
#

Lang files?

#

I don't do SQL so I'm good BoniCool

radiant jay
#

@slender thistle lang files = dont hard code text

modest maple
#

I HATE AJAX SO FUCKING MUCH

modest maple
#

current down to about 0.75s data gather time

empty owl
#

how would I get an array of IDs of everyone in a guild

#
message.guild.members.array``` is weird
modest maple
#

think its client.users that returns a list

quartz kindle
#

0.75 including the loading time?

modest maple
#

yes

#

you have no idea how long it took to do that

#

xD

quartz kindle
#

loading time is probably 90% of that, no point in optimizing lol

modest maple
#

xD

#

it used to be like 6 secs

#

cuz Ajax says its loaded before it has

quartz kindle
#

@empty owl you just want the ids and nothing else?

earnest phoenix
#

message.guild.members.keyArray() returns an array of IDs

#

@empty owl

opal halo
#

discord.js

opaque eagle
#

Has anyone used koa.js before for an API, and how did it go?

open rampart
#

How do I make it so a specific server emoji shows?

lament meteor
#

Use <:name:id> u can get it from doing \:emoji:

empty owl
#

thanks @earnest phoenix

earnest phoenix
#

np

crystal pendant
#

Lol

#

!help

lament meteor
opal halo
#

no answernotlikenoot

lament meteor
#

check if args[1] is undefined cause you can just run the command without a second argument

lavish forge
#

What would be the lightest weight request type package (js ofc) to keep CPU and RAM percentage as low as possible for fairly rapid requests (every minute hitting several different api's)? I'm currently using node-fetch, and not sure if it's the reason why I'm hitting >100% CPU usage. Ping me for responses pl0x.

lament meteor
#

@lavish forge try to look at centra... if it seems a bit complex maybe look at phin, its a package that makes centra a bit more clean

#

also if you are confused that it returns a buffer just do .toString or JSON.parse

ember atlas
#

Doesnt the js error TypeError: Cannot read property '__' of undefined mean something is not defined in line before ___ ?

sudden geyser
#

it means the property before __ is undefined, so yes.

ember atlas
#

damnit

#

now its gonna take me 5 years to find out what is undefined

#
const { RichEmbed } = require('discord.js'); 
const db = require('quick.db'); 

module.exports = async (client, messages) => { 

    const number = messages.length

    const messageLogChannelVar = db.fetch(`messageLogChannel_${messages.guild.id}`)
    const messageLogChannel = client.channels.get(messageLogChannelVar)
    if (!messageLogChannelVar) return;

    const embed = new RichEmbed()
    .setAuthor('Bulk Delete')
    .addField('Channel', `${messages.channel.name} (${messages.channel.id})`)
    .addField('Number of Messages', `${number}`)
    .setFooter(client.user.tag, client.user.avatarURL)
    .setTimestamp()
    .setColor('BLUE')

    messageLogChannel.send(embed)
}
``` Any idea what might be defined before `id` in the messageLogVar line?
sudden geyser
#

is that the bulkDelete message listener?

#

what version of Discord.js are you using

restive furnace
#

@ember atlas message isnt array and you defined number to messages.lenght.

#

(atleast i think)

ember atlas
#

Any idea why it would say deleted channel instead of the channel name?

#

I solved it, but its saying that instead of the mention

marble juniper
#

store the channel

#

before you delete it

#

just store it in a var

ember atlas
#

how

#

oh i see now

#

Amen

#

Thank you

marble juniper
#

np

ember atlas
#

For a role, if I wanted to know if one specific property of it changed, how would I go about that?

#

Like if the color just changes, I just want that to be shown, etc

restive furnace
#

rawEvents

ember atlas
#

What are those

#

And how would I use them

prisma hound
#

So I am trying to run my bot in heroku
everying goes well except when I run any command ( say .help .ping etc)

#

the error's are

#
2019-12-02T06:43:54.213245+00:00 app[worker.1]: (node:4) UnhandledPromiseRejectionWarning: ReferenceError: botconfig is not defined
#

now this is the code to that part

ember atlas
#

Code?

prisma hound
#
bot.on("message", async message => {
    if(message.author.bot) return;
    if(message.channel.type === "dm") return;

    var prefixes = JSON.parse(fs.readFileSync("./prefixes.json", "utf8"));
    if(!prefixes[message.guild.id]){
        prefixes[message.guild.id] = {
            prefixes: botconfig.prefix
        };
    }
late latch
#

lul

ember atlas
#

The error is self explanatory

#

You never defined bot config

prisma hound
#

I know hang on got more

ember atlas
#

Show the entire file

#

But if your token is there blur it

late latch
#

What kind of mistake?

prisma hound
ember atlas
#

yes

#

or hastebin

prisma hound
#

ok hang on deploying once more just in case
I fixed it

ember atlas
#

nice

#

you just needed to define your bot config

prisma hound
#

oh got it

#

yesss I am an idiot

late latch
#

you require botconfig?

prisma hound
#

yeah I thought I required but I accidentally uncommented

#

now works

#

🤦‍♀️ my bad lol

late latch
#

ok

steel cloak
#

in discord.js would {message}.createReactionCollector be the best way to monitor a message and whenever someone reacts with an emoji run some code?

grizzled raven
#

if you want to actually get someone to react, yes, but if its to monitor alot of messages for reactions, just use the messageReactionAdd event

tawdry sleet
#

Doesnt this only work on fetched messages?

small prairie
#

Quick Question How do I edit Channel Settings ERIS

fluid basin
#

wait isnt it on the docs?

mossy vine
#

it is

small prairie
#

II literally Started it today /:

mossy vine
#

but who even reads docs before asking a question

fluid basin
small prairie
#

well I read

fluid basin
#

yea true

#

lol

small prairie
#

I mean permissions /:

mossy vine
small prairie
#

Thanks

fluid basin
#

ye

#

its all there

#

just gotta find

#

Ctrl-F your best friend

opal halo
earnest phoenix
#

just ignore it

west spoke
#
def __init__(self, x_PAT=None, y_PAT=None, name=None, title=None):
        self.currentGraph = open("CURgraph", 'r')
#

alright

#

so when i try to get the string self.currentGraph elsewhere in the file, it shows it as zero-width, or the string is removed, eg when i do self.currentGraph.read()

#

and it reads it as ""

short siren
#

@opal halo show more code

crystal salmon
#

whaa

last ferry
#

you would have to find a drawing library for whatever language youre using, tint the original image pink, and put the hearts on top

#

im not gonna tell you how exactly to do it, figure it out yourself

#

yeah so use js to manipulate the image

#

with a drawing library

lunar crystal
#

Maybe with canvas ?

late latch
#

Guys, tell me how to make the site display the number of servers to which my bot is connected.

mossy vine
wheat jolt
#

@earnest phoenix you can use canvas

#

What you're trying to do

earnest phoenix
#

HELP

#

Please

modest maple
#

CODE PLEASE

earnest phoenix
#

whatever your using the method toString() on is undefined

#

oh wait nvm that looks like an eval

mossy vine
#

not eval

#

ejs

earnest phoenix
#

or is it idk

#

there are 2 errors there so

#

i think ? nvm imma just stop talking lmao

prime cliff
sudden geyser
#

check if you set permLevel in your module exports

#

also the replace chain is scary

ember atlas
#

For my purge command (js & djs) how can I make it ignore pinned messages?

sudden geyser
#

check if it's pinned when calling the filter method (.pinned)

ruby talon
#

bruh 10/15 git repo's are private

#

xDD

amber fractal
#

Yeah

#

Because a lot of people dont give their code for free

quartz kindle
#

and a lot of people hide it to avoid the humiliating thought of someone judging their "bad" code

modest maple
#

yh

#

i mean my code is freaking trash anyway

#

why try to hide it now xD

earnest phoenix
#

idk how create a bot with python
pls help DM

quartz kindle
#

step 1: learn python

short siren
#

Do u know python @earnest phoenix

#

Or

earnest phoenix
#

:v

#

nvm

#

...

valid frigate
#

you can't expect people to just give you blocks of code on demand

#

and yes like tim said, if you don't know python you should learn the basics

earnest phoenix
#

I put pip install discord.py

#

and dont work

quartz kindle
#

have you ever used python before?

earnest phoenix
#

no

valid basin
#

😬

knotty steeple
#

pls learn python

quartz kindle
#

then you have to learn it first, dont jump straight into bot making

knotty steeple
#

dont just try to make a discord bot and u cant even code anything

valid basin
#

Ya python is not that hard to get into

earnest phoenix
#

||>:v||

#

any help?

quartz kindle
#

making a bot without knowing how to use the language is like writing an essay without knowing how to read or write

modest maple
#

not known python and jumping into discord.py is like jumping into a freight train head first

earnest phoenix
#

nvm 😠

modest maple
#

it rips you up and spits you out

valid basin
#

Cant post links?

sudden geyser
#

maybe there was an invite link

modest maple
#

and python isnt massively hard to get into

valid basin
#

There was

#

To the python server

sudden geyser
#

then that's why it got deleted (bot devs bypass)

modest maple
#

but not knowing the basics and then jumping into D.py is alot harder

valid basin
#

Thx

#
  1. Before even attempting to create a discord bot, please learn python (?tag lp)
  2. To install discord.py, please run python3 -m pip install discord.py (linux), or py -3 - m pip install discord.py (windows)
    ... a. If you wish to use voice functionality, please use discord.py[voice] instead of discord.py
  3. Take a look at https://github.com/Rapptz/discord.py/blob/master/examples/basic_bot.py. Mess around.
  4. When you start making your bot, use the commands ext: https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html
  5. The library documentation is available at https://discordpy.readthedocs.org/en/latest/

The #help and #more-help channels in this server are related to using this library. If you want help with python questions, please ask in the python server.

If you are migrating from the old version of this library (0.16.XX; async) to version 1.XX.XX please follow the migrating guide http://discordpy.readthedocs.io/en/latest/migrating.html

modest maple
#

just take that.

#

and add this first:

#

Learn the basics

#

    Getting started
    Execute Python scripts
    Variables
    Strings
    Replace
    Join
    String find
    Split
    Random numbers
    Keyboard input

Control structures

    If statements
    For Loops
    While loop

Data and operations

    Functions
    List
    List operations
    Sort list
    Range function
    Dictionary
    Read file
    Write file
    Nested loops
    Slices
    Multiple return
    Scope
    time and date
    Try exception
    How to use pip and pypi <---- sorta Pip more important than PyPi


OOP

    Class
    Constructor
    Getter and setter
    Modules
    Inheritance
    Static method
    Iterable
    Class method
    Multiple Inheritance
#

they are the most basic parts you should know

knotty steeple
#

thats alot of basics

twilit rapids
#

And that's just the tip of the iceberg if you want to master python

modest maple
#

^

#

its not even that much

knotty steeple
#

most times you wont even do OOP

modest maple
#

legit the whole of D.py is based around OOP

knotty steeple
quartz kindle
#

using oop is one thing, creating oop is another

modest maple
#

^^

knotty steeple
#

doesnt mean urself doing python will use oop

modest maple
#

id still advise you know it

earnest phoenix
#

all discord libs are OOP because the discord api is OOP

fax

modest maple
#

if you dont know what a class is or how it works you will have one hell of a bad time down the road

quartz kindle
#

took me a long ass time to learn them, took me even longer before actually starting to write them

knotty steeple
#

jAvAsCRiPt oOp

modest maple
#

yes

#

most languages are OOP

#

Clojure which is a subscript of JS is a 'Fully Functional' language which has no OOP aspects

#

its incredibly powerful but very hard to get used to

quartz kindle
#

C also doesnt have built in oop afaik

#

but its doable in all languages, even if in a hacky way

modest maple
#

yh

#

some are Functional Types for a reason tho

#

and are better off left that way xD

quartz kindle
#

yeah, one could say the whole concept of oop is in itself an abstraction layer / high level

modest maple
#

yh

knotty steeple
#

ok lets end

#

oop is ass

#

this is my ted talk

modest maple
#

that is what clojure is capable of

quartz kindle
#

its interesting how oop kinda was designed specifically so people could use each other's code

modest maple
#

going from OOP to FFP is quite somthing

quartz kindle
#

everything you write in oop, you write it with the intention of having other people use it

atomic quarry
#

So I'm having a problem

modest maple
#

whats up

atomic quarry
#

I run the code but it doesn't say the bot is online

modest maple
#

code?

#

and what programming language and lib

atomic quarry
#

I'm using Node.js

modest maple
#

whats the code?

knotty steeple
#

node.js

#

is not

#

a

#

language

modest maple
#

its a lib

knotty steeple
#

rEEEEE

#

NO

modest maple
#

and it tells us its in js

knotty steeple
#

ITS A HECKING RUNTIME

#

STOP

earnest phoenix
#

a lib

#

lol

modest maple
#

im calling it a lib

quartz kindle
#

its an interpreter lul

modest maple
#

xD

knotty steeple
#

but thats

#

inaccurate

#

runtime works right xd

modest maple
#

everything is a lib if you think about it

knotty steeple
#

ok

#

no

#

but

#

ok

quartz kindle
#

executables are libs for operating systems

#

huehue

knotty steeple
#

tim stop

#

no

modest maple
#

anyway

#

back to the issue at hand

#

xD

knotty steeple
#

@atomic quarry library

#

pls

quartz kindle
#

and post code

modest maple
#

more importantly post code

earnest phoenix
#

speak spanish?

knotty steeple
#

also very relatable status

earnest phoenix
#

i need help in spanish

quartz kindle
knotty steeple
#

thanks

atomic quarry
modest maple
#

does the bot come online or no?

earnest phoenix
#

since this is copy pasted code, the token is wrong if it doesn't come online

modest maple
#

^

#

altho it should throw an error for invalid token?

atomic quarry
#

No

#

It doesn't give any error

modest maple
#

did you replace the token

atomic quarry
#

all it says is this

modest maple
#

did you replace the token

atomic quarry
#

Thats what it says after I run the code

modest maple
#

did you put in your OWN bot token

atomic quarry
#

Yes

earnest phoenix
#

any help?

#

import discord
from discord.ext import commands

client = commands.Bot(command_prefix = '-')

@client.event
async def on_ready():
print('Bot is ready')

client.run('Token')
#

i put this ^^

#

and dont work

modest maple
#

client.run should not go in the event

earnest phoenix
#

oh

modest maple
#

it needs to be outside the function

earnest phoenix
#

ok

prime cliff
#

Are you getting any errors too? Just saying it does not work it not really helpful

modest maple
#

he wont get any errors it just wont fire

earnest phoenix
#

the bot dont says error

modest maple
#

cuz it wont go to on_ready

prime cliff
modest maple
#

move your client.run("token") outside of the on_ready

#

at the bottom

earnest phoenix
#

ok

#

@modest maple

#

import discord
from discord.ext import commands

client = commands.Bot(command_prefix = '-')

@client.event
async def on_ready():
print('Bot is ready')

client.run('Token')

#

?

#

:v

modest maple
#

yh

earnest phoenix
#

dont work xd

modest maple
#

error?

earnest phoenix
#

dont say error ;v

modest maple
#

it should be discord.bot btw i think

#

rather than commands.bot

#

or discord.client would work aswell

earnest phoenix
#

ok

obtuse thistle
#

I am almost sure there was a way to fix the thing with the forward slashes but I don't know how to write it in Google :D
So here we go:

I have this

            text = text.Replace("Starting/Maximum Cooldown Reduction", "**Starting/Maximum Cooldown Reduction**");

But this piece of code does
**Starting/**Maximum Cooldown Reduction
instead of
Starting/Maximum Cooldown Reduction

I tried doing

            text = text.Replace("Starting//Maximum Cooldown Reduction", "**Starting/Maximum Cooldown Reduction**");

But then it shows as
Starting/Maximum Cooldown Reduction

earnest phoenix
#

i need version 19.3.1 ?

#

@modest maple

modest maple
#

what?

earnest phoenix
#

of python

modest maple
#

what version of D.py r u using?

earnest phoenix
#

3.8.0

modest maple
#

not what version of python

earnest phoenix
#

how i k that?

#

@modest maple

modest maple
#

what r u using to code?

#

pycharm, idle etc..

earnest phoenix
#

visual stuido code :u ||srry for my bad english||

modest maple
#

just under where u import everything

#

do print(discord.__version__)

#

think it is

earnest phoenix
#

in cmd?

#

or visual studio code?

modest maple
#

VSC

earnest phoenix
#

ok

modest maple
#

then run your code

earnest phoenix
#

dude

#

dont work ;c

valid basin
#

what's the error giving you

earnest phoenix
#

dont say error

modest maple
#

whats the code again

earnest phoenix
#

import discord
from discord.ext import commands

client = commands.Bot(command_prefix = '-')

@client.event
async def on_ready():
print('discord.version')

client.run('token')
modest maple
#

ur client.run IS STILL IN THE FUNCTION

#

move it out of the function

earnest phoenix
#

where :u

modest maple
#

and the print statement

#
client = commands.Bot(command_prefix = '-')

"""@client.event
async def on_ready():""" <--- ignore this shit for now
print('discord.version')

client.run('token')```
earnest phoenix
#

ok'

modest maple
#

also

#

remove the string

vital lark
#

chill

modest maple
#

its just gonna send 'discord.version'

vital lark
modest maple
#

yh yh

earnest phoenix
#

@modest maple

modest maple
#

if he doesnt know how functions work he needs to go back to basics

earnest phoenix
#

import discord
from discord.ext import commands

client = commands.Bot(command_prefix = '-')

"""@client.event
async def on_ready():""" <--- ignore this shit for now
print('discord.version')

client.run('token')

#

?

modest maple
#

print(discord.__version__)

earnest phoenix
#

ok

modest maple
#

how much python have you actually done

knotty steeple
#

🥣

earnest phoenix
#

SyntaxError: EOL while scanning string literal

modest maple
#

how much python have you actually done

knotty steeple
#

none

earnest phoenix
#

@modest maple SyntaxError: EOL while scanning string literal

modest maple
#

Read^^

knotty steeple
#

this is the person that tried to code a discord bot without python experience

modest maple
#

learn

#

come back

earnest phoenix
#

ok

knotty steeple
#

come back in 2 weeks

#

it doesnt take 1 read of a website to learn a language

#

also javascript is a far better language mmLol

earnest phoenix
#

i have a problem

modest maple
#

thats very subjective

earnest phoenix
#

im spanish :u

knotty steeple
#

ok

#

ur reading this

#

read the website

modest maple
#

pretty much

#

nothing changes in python across languages

#

so legit makes no diffrence

earnest phoenix
#

ok

#

@modest maple IndentationError: expected an indented block

modest maple
opal halo
#

@short siren I will DM you the code later

earnest phoenix
#

@modest maple work :p

modest maple
#

What

earnest phoenix
#

the bot

#

work

modest maple
#

Coolio

earnest phoenix
#

the bot is online xd

modest maple
#

I'd advise you still read and practice the basics

#

Cuz turning the bot on is only the beginning

earnest phoenix
#

yeah

#

;v

opal halo
#

@short siren nvm I fixed it...

#

how fix?

#

I cut off the first pic to not show my client id

sudden geyser
#

Developer Application Page -> Your bot -> Bot tab (left under OAuth2) -> Disable requires code grant

opal halo
#

ah, yes it worked thank you

earnest phoenix
#

client id is not sensitive information

#

no id is sensitive information

#

all ids are exposed and free to get

earnest phoenix
#

hi

#

any help

#

?

#

why this dont work?

#

@client.command() async def ping(ctx): await ctx.send(f'pong! (round(client.latency 1000))ms)

outer niche
trail reef
#

get rid of the extra "

#
embed.set_footer(text="Coded by Trock-y | Trock-y4143"")

needs to become

embed.set_footer(text="Coded by Trock-y | Trock-y4143")
#

@outer niche

outer niche
#

Oof ok thx

slender thistle
#

@earnest phoenix Is there any error being output?

west spoke
#

@outer niche EOL means you missed any of these: (),"",'',<>,[],{},etc..

#

if it shows that just check if there is a missing/extra one

empty owl
#

quick question: how do i get the actual date when doing Date.now()?

earnest phoenix
#

what

empty owl
#

what

earnest phoenix
#

you... do get it?

empty owl
#

wdym

earnest phoenix
empty owl
#

what

west raptor
#

@empty owl you already get the actual date?

empty owl
#

like in readable

empty owl
#

message.attachments.first.url() am i using correctly

#

discord.js

#

cause when I attach a photo with the comment of 'photo' it acts like there is no photo

sudden geyser
#

try it out and see

tacit stag
#

I know I already asked this before but didnt take note:

what are cheap hosting options for a bot?

empty owl
#

@tacit stag digital ocean with github student

#

u get credit

#

@sudden geyser its not working
url isnt a function
but i tried url plain out and it doesnt work either

sudden geyser
#

Look in the Discord.js docs for Message#attachments

empty owl
#

yea

sudden geyser
#

You'll see a first property that's a function, so call first() like a function instead of url() as it's not one

empty owl
#

oh

#

thanks

slender thistle
tacit stag
#

thanks @slender thistle

empty owl
#

im back

#
  let person = message.mentions.members.first();
  let name = args[1]
  if (!person || !name) return message.reply('Missing Args... Usage: !accept <ping> <name>')
let mod = message.guild.roles.find(val => val.name === 'Mod');
  let admin = message.guild.roles.find(val => val.name === 'Admin')
  let owner = message.guild.roles.find(val => val.name === 'Owner')
  let role = message.guild.roles.find(val => val.name === 'Student')
    if (message.member.roles.has(mod.id) || message.member.roles.has(admin.id)) {
      person.setNickname(name)
      person.send('Verified.')
   
      person.addRole(role.id)
        message.channel.send("Success!")
      
      
    } else {
      message.channel.send("**Restricted Access**")
      
    }


#

says Cannot execute action on a dm

#

but this isnt in a dm

#

soo

#

also the nickname change and role add arent working

#

nvm the role is workng but nickname isnt

sudden geyser
#

Are you sure the error's from that snippet of code? I'd assume it would have throw a TypeError if it was from a DM.

empty owl
#

yea

outer niche
#

@earnest phoenix EOL means you on missing or have too many of these: (),"",'',<>,[],{},etc.

slender thistle
#

aka a missed apostrophe there as well as curved brackets in this case

#

If you don't want to further format the response, tbh just send the integer returned by round

outer niche
#
            await sondageMessage.add_reaction(":thumbsup:")
            await sondageMessage.add_reaction(":thumbsdown:")```
#

Is there something wrong with this because I cannot get it to do reactions

west spoke
#

Try without the : and if that doesnt work use custom emojis.

slender thistle
#

\👍
\👎

west spoke
#

smfh

opal halo
#

how would I get my bot to change his activity every 6 hours in discord.js?

summer torrent
#

setInterval

trail verge
#

Hey. I'm trying to make a bot using Regular Python (Without the Discord Python Extention thing) and I need some help.

1) I can't get images to work, even with the Pillow Extension
2) I don't know how to make text Bold or coloured
Note: I am using Windows 10

valid basin
trail verge
#

Not for Discord

#

For Coding using Python

valid basin
#

oh

floral stone
#

Where are you trying to send images to?

trail verge
#

Not trying to send them.....trying to make them appear in the code:

Eg:

img = <image of Charizard>
print (img)```
#

The output will give me the image inside the module (the thing that shows the output of your code)

#

I'm using IDLEpython

#

3.8

#

Windows

loud salmon
#

oh so this is just python help

#

fuck

#

yeppers

#

thats it

trail verge
#

okay

#

thank you

restive furnace
#

@trail verge

trail verge
#

I'll check that out once I have the basic parts of my script working

#

scripts*

grave mist
#

Um, I wanna create a dashboard like letting users login with their discord in my site and all the things they do there would be saved in bot like changing prefix. But I don't have any idea on how to transfer the prefix from site to bot. Can anyone help me?

modest maple
#

@trail verge idk if you still need help with the python stuff but, as far as I'm aware you cannot 'print' a image you load up in python in the IDE mostly because when you open a file it just takes the actual content of the file

#

If you want to show files on screen you'll need some sort of module to create a application

#

Like wxpython, tkinkers, etc... Or pygame

slender thistle
#

obviously pygame is mentioned

modest maple
#

Because we all know pygame is the superior way to make an application in python xD

lunar crystal
#
client.on('ready', () => {
  console.log('Les logs de vitas')
});

client.on('message', message => {
  if (message.content === prefix +'logs' ) {
  const logembed = new RichEmbed()
  .setColor('#679ec5')
  .setTitle(`**Voulez-vous créez le salon ${Vitas} ?**`)
  .then(() =>
  message.react(':white_check_mark:' ))
  .then(() =>
  message.react(':x:'))
  if(message.react === ':white_check_mark:')
  guild.createChannel('logs-vitas', {type: text})
  .then(console.log)
  .catch(console.error);
}})```
earnest phoenix
lunar crystal
#
    at Client.client.on.message (c:\Users\hieli\Desktop\Vitas\node_modules\index.js:210:4)
    at Client.emit (events.js:203:15)
    at MessageCreateHandler.handle (c:\Users\hieli\Desktop\Vitas\node_modules\dis```
earnest phoenix
#

well yeah

#

read your code

modest maple
#

Apart from that whole client.cleint stuff

#

You will also probably crash with the reactions btw

#

Cuz :X: doesn't work for discord bots

#

Orwhite_check_mark

lunar crystal
#

ouh ok

trail verge
#

@modest maple it's fine. I can liev without the images

#

live*

split hazel
#

Is there a way to redirect traffic from
subdomain.mywebsite.com:80
to
somehost.com:2378

vital lark
#

using a CNAME (if you're using Cloudflare/GitHub pages)

fluid basin
#

ehh nope I doubt a CNAME will work

split hazel
#

were using namecheap

vital lark
fluid basin
#

unless the url is something like subdomain.mywebsite.com:2378

#

then you can use CNAME

split hazel
#

yeah we have that

#

but we want to direct it to port 80

fluid basin
#

you could just have a proxy for that

vital lark
#

reverse proxy

split hazel
#

on apache2?

fluid basin
#

if you can configure your server settings

#

yeah

#

possible

#

but the only problem with that is you need to deal with the IP and stuff

#

since if you directly get the IP of the client it will be the proxy server and not the real IP

vital birch
#

.

split hazel
#

we tried with this .htaccess file but we kept getting server 500 error

  ServerName subdomain.mywebsite.com

    ProxyRequests Off
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyPass / somehost.com:2378/
    ProxyPassReverse / somehost.com:2378 /
    <Location />
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>```
fluid basin
#

ehh

split hazel
#

with the host domains and the domain being our own

fluid basin
#

you have to change your site configuration

#

not access configuration

#

.htaccess is access configuration

split hazel
#

where do you do that on namecheap

fluid basin
#

yeah which is why it isn't really possible

#

I mean

#

unless you have a vps lying around

#

you will need to change apache config which is located in the installation directory of apache

quartz kindle
#

where is somehost.com hosted? you can reverse proxy from somehost:80 to somehost:2378

#

you can also try messing around with SRV records

outer niche
#
            await sondageMessage.add_reaction("👎")```

Is there something wrong with this because I cannot get it to work
slender thistle
#

Wdym can't get it to work

#

Any errors

split hazel
#

@quartz kindle somehost is basically the hosting, its on pterodactyl

#

i have a sample http server running on it to test if its working

#

and we have no clue how to reverse proxy without changing the apache root config (which we cant)

#

and we tried with srv but we're unsure of what to put

outer niche
amber fractal
#

The english couldn't be more plain.

#

I don't use python, but you have an unexpected indent.

modest maple
#

@outer niche read the error

restive furnace
#
if/else/function:
    print('correct indent')
  print('this line will give errors because wrongly indented')```
#

@outer niche

slender thistle
#

Basic python teaching

earnest phoenix
#

i get error 403 on my website (other browser°

split hazel
#

Are there any ratelimits on @me (accessed with a bearer token from oauth2)

#

im working on discord sign in and just making sure if i can call it to get the username/guilds as much as i want without getting ratelimited

amber fractal
#

I'm not entirely sure, but I would say there's a very high probability that there is

split hazel
#

if there is i dont really mind

#

we wont be fetching it every second

earnest phoenix
#

q

mossy vine
#

this is not vim

earnest phoenix
#

every endpoint has a ratelimit

earnest phoenix
#

hi bois

#

i need help

#

why this dont work

valid basin
#

:v

earnest phoenix
#
    async def ping(ctx):
        await ctx.send('Pong!')```
valid basin
#

what branch are you using

earnest phoenix
#

you mean the app?

modest maple
#

Nop stop him there

#

Did you read the link I sent u

slim heart
#

whats the best way of implementing things like patreon and nitro boosting into an api for premium users? Atm i use roles that they get and add it up but i've a feeling this isn't the best option

modest maple
#

Patreon have a webhook you can use

#

I think

earnest phoenix
#

@modest maple Ok ||;u||

fluid basin
#

cant do much for nitro boosting though

#

since the only way to find out is through the booster role

modest maple
#

Read what I sent u and learn it

#

Cuz you still haven't got indentation learnt yet

vital lark
#

@slim heart can't view nitro boosting by event, but you can create a webhook server for Patreon

atomic quarry
#

Does anyone here know how to do a linter if so I need help cause I've tried to do it but I can't

mossy vine
#

just.. install one?

atomic quarry
#

I can't the computer I use has almost no space and it's a piece of s***

modest maple
#

👏 What 👏 language 👏 are 👏 you 👏 using👏

atomic quarry
#

Node.js