#development

1 messages · Page 1671 of 1

cinder patio
#

Object.assign just copies all the properties of one object to another

#

so no, that won't convert a normal object to a mongoose one

earnest phoenix
#

Python, XML, Kotlin, Protocol Buffer, SQL and Rust

onyx hare
#

I Get A Error TypeError: Cannot read property 'find' of undefined how can i make the "permLevels" defined?

exports.run = async (client, message,) => { 
    const friendly = client.config.permLevels.find(l => l.level === level).name;
    message.reply(`Your permission level is: ${level} - ${friendly}`);
  };```
lyric mountain
#

wtf is prototype buffer?

cinder patio
#

Buffer.prototype?

earnest phoenix
#

Well there's syntax highlighting support for JavaScript which is upcoming in new discord mobile updates which i added

cinder patio
#

bruh

#

I just saw what you were talking about lmao

lyric mountain
tired panther
sinful thistle
#

Apparently this is good ping?

cinder patio
tired panther
sinful thistle
#

thats what I was told

#

pog chamo

tired panther
#

yes lol

sinful thistle
#

champ*

earnest phoenix
sinful thistle
#

o

#

ty kinda human

#

kind*

#

kind*

#

kind*

lyric mountain
sinful thistle
#

o

#

Oh

lyric mountain
earnest phoenix
#

A language

lyric mountain
#

Discord desktop: a
Discord mobile: let's support an unknown lang but forget about mainstream langs

tired panther
# cinder patio Describe your problem better pls
  1. A Mongoose object is a object, which has keys for doing .save() or running mongoose functions.
  2. I save my documents in a cache as a non mongoose object
  3. Want to update the document without using. find() (with .save())
cinder patio
#

why not just save the mongoose object?

#

sounds like the right approach

tired panther
earnest phoenix
#

Adding syntax highlighting support for discord mobile is just absolute pain, written in Kotlin clusterfuck

frigid mountain
#
const Discord = require('discord.js')

module.exports = {
    name: 'say',
    run: async (message, args) => {
        const sayMessage = args.join(" ")
        message.channel.send(`${sayMessage}`)
    }
} // >say 'hello'
// hello

how do I make this embed , and I did the the #faq but I just dont know how to start

lyric mountain
#
Test test
syntax = "blabla"
import aaa
message wtf
#

protobuf

earnest phoenix
#

yes

lyric mountain
#

looks awful ngl

earnest phoenix
#

I might implement TextMate support for discord mobile to add syntax highlighting support for almost all languages KEKW

cinder patio
lyric mountain
#

because why not

earnest phoenix
#

yes

tired panther
earnest phoenix
tulip ledge
#

Does anyone know why this css is only making the image rounded on 1 side?

   .Box2 img {
    float: left;
    width: 350px;
    padding-left: 100px;
    height: auto;
    position: relative;
    top: -20%;
    border-radius: 25px;
   }
grizzled raven
#

are you sure you can see the other side?

#

it looks like it's being cut off

lyric mountain
#

padding on an image?

pure stream
#

i have a coinflip bot. Earlyer today it was working fine but now only 1 command works (the most recenetly made one how would i fix this?

lyric mountain
#

show that recently made code

#

actually

#

show the whole code regarding commands

pure stream
fierce ether
#

whats the diff between sending a webhook and sending a embed?

pure stream
pure stream
fierce ether
#

ik what an embed is

pure stream
#

its the dankmemer message

#

ah ok

fierce ether
pure stream
#

you dont know what a webhook is

fierce ether
#

ik what a webhook is

#

i dont see the difference

slender wagon
#

oop, sorry late reply and i am trying to make it so when you send my website link on discord it sends the embed with that color

pure stream
#

well i have a command but it is only replys to lowercase

fierce ether
slender wagon
#

no that's not the case

#

i am talking about meta tags

#

and embed colors

pure stream
#

like if i say flip (the command)

#

it only works in lowercase

fierce ether
#

show me your message event

pure stream
#

me or @slender wagon

fierce ether
#

you

pure stream
#

@bot.event
async def on_message(message):
if message.content.startswith('flip'):
coinflip = random.choice(list1)
await message.channel.send(coinflip)

#

what would i want it to be

fierce ether
#

('flip'): its defined as lowercase?

pure stream
#

yes

fierce ether
#

if(message.content.toLowerCase() == 'flip')

marble juniper
#

anyone know what the ratelimit is for editing a message

#

lol

fierce ether
marble juniper
#

just tell me how many I can do

#

lol

earnest phoenix
#

how can i get the bot 24/7 online any idea ?

earnest phoenix
#

ok

pure stream
#

import random
import discord
from discord.ext import commands
prefix = "flip"
bot = commands.Bot(command_prefix=prefix)
list1 = ('Heads', 'Tails')

@bot.event
async def on_message(message):
if message.content.startswith('flip'):
coinflip = random.choice(list1)
await message.channel.send(coinflip)

fierce ether
#
@bot.event
async def on_message(message):
    if(message.content.toLowerCase() == 'flip'):
        coinflip = random.choice(list1)
        await message.channel.send(coinflip)```
pure stream
#

ok

#

it didnt work

#

this time it didnt respond at all

earnest phoenix
#
@bot.event
async def on_message(message):
    if(message.content.toLowerCase() == 'flip');
        coinflip = random.choice(list1)
        await message.channel.send(coinflip)
#

try this ;-;

pale vessel
#

It's string.lower() in python

fierce ether
#

oh yh

pale vessel
#

so message.content.lower()

earnest phoenix
#

piro

#

ayo i finally got my purge cmd working

slender thistle
#

I was about to start throwing insults

#

Thanks flaze

haughty mirage
#

Are there any explicit docs on discords ratelimits.
I.e X number of req/min for sending, editing, fetching etc.

pale vessel
#

They're mostly dynamic

#

You'd have to look through headers sent by Discord

haughty mirage
#

Oh I see

spare portal
#

i have an unscramble game for my bot, and im trying to make it so that the bot sends messages with hints with timeouts, but after the user guesses the word (correct or incorrect) it keeps sending the messages

normal sage
#

@earnest phoenix @fierce ether spoonfeeding doesnt help anyone ;-;

earnest phoenix
#

;-;

earnest phoenix
slender wagon
#

how do i get the ping of the bot

cinder patio
#

a js-python hybrid

slender wagon
#

ik dumb question

normal sage
slender wagon
#

js

normal sage
#

idk

earnest phoenix
#

i think ${member.username}

slender wagon
earnest phoenix
#

ping.js hm

feral aspen
#

Don't mind me.

#
for (var i = 1; i <= 5; i++) {
  myArray.push(i);
};
#

I'm just learning about loops, but regarding the final expression, it executes after the for loops executes the code that is inside the curly braces, right?

cinder patio
#

yes

feral aspen
#

Sweet.

normal sage
feral aspen
#
for (var i = 1; i <= 5; i++) {
  myArray.push(i);
};

console.log(myArray);

// Same as
var i = 1;

while (i <= 5) {
  myArray.push(i);
  i++
}
#

I guess it is like that.

normal sage
#

can you not give people the answer if you dont know it? @earnest phoenix

tired panther
#

ups, wrong chat

earnest phoenix
#

@tired panther nais dank memer

rustic nova
#

hey hey @earnest phoenix if you're willing to help people in here, you can do so by giving hints, not by spoonfeeding them with unrelated things to their question CatThumbsUp

outer niche
#

When I press login on this system I cannot figure out why it will not go to my welcome page can anyone help
https://pastebin.com/hq1BgLqg

snow portal
#

does anyone know how to create a class in visual studio? i forgot haha (c#)

dusky harness
#

SyntaxError: Unexpected end of input
←[90m at wrapSafe (internal/modules/cjs/loader.js:979:16)←[39m
←[90m at Module._compile (internal/modules/cjs/loader.js:1027:27)←[39m
←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:928:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)←[39m
←[90m at internal/main/run_main_module.js:17:47←[39m
what is my fault i didn't understand

rustic nova
#

The ping

#

was very

#

unnecessary

round cove
#

fastest ghostping int he west

scenic kelp
#

can you

#

bruh

unkempt ocean
#

aaah

earnest phoenix
#

why

drowsy crag
rustic nova
#

-m 698183217215176783

gilded plankBOT
#

🤐 Muted EFEILGAZHD#9321 (@dusky harness)

rustic nova
#

im done

#

they did that before

earnest phoenix
#

yikes

crimson vapor
#

bro

earnest phoenix
#

Da fuck happened here

summer torrent
#

atmods

outer niche
#

Can anyone help me on the PHP

slim heart
#

@spare goblet is it eeara or eyeara

unreal token
#
client.on("message", async message => {
  if(["Katsumi#8170", "@Katsumi#8170"].includes(message.content)) { 
   await message.channel.send(`ddddddddddddddddddddddddd`);
}
})

Why is it that when its the name so : Katsumi#8170 it works but when its a ping like @Katsumi#8170 it does not send anything :v

quartz kindle
#

because thats not how pings appear in the message

#

if you console.log(message.content) you will see that a ping does not show up like that

unreal token
#

o

#

its logging message content across servers :v

#

o alr

opal plank
#

bad

#
message.mentions.users.first()?.id```
if your node supports it
#

first() can return undefined

#

you'll get errors if theres no mentions

#

Cannot read property id of undefined mmulu

quartz kindle
#

they are doing .includes(message.content) tho

#

which only matches exact message content, and not message includes content

opal plank
#

oh shit you right

boreal iron
unreal token
#

i tried doing if (message.content.includes("@Katsumi#8170")) { but same result

zenith terrace
#

even erwin blind

#

why not just do what was said above

boreal iron
#

as long as it’s not detritus

dusky lagoon
#

you mean js const girlfriend = require('../json/kidnapping.json');

outer niche
unreal token
#

oh wait nvm ty

opal plank
dusky lagoon
#

So i have been working on how to get data from website to steal their .json file for a whole day now to use it in my own commands instead of getting open source api's and i felt super smart as in OMG i stole your website data .json files muhahaha but now i just feel dumn as in how simple it was and its just the same as a open source api 🥲

quartz kindle
#

thief

opal plank
#

how do i get index number of an element in an array?

#

['foo', 'bar', 'cyan']

i wanna check if bar comes before foo, and before cyan for example

modest maple
#

in js?

opal plank
#

yup

modest maple
#

isnt it like indexOf?

opal plank
#

dont know if indexOf works there

#

oh it does

modest maple
#

look at me, the python dev who can remember JS sad

opal plank
#

ty

modest maple
#

This is what react does to me sad

modest maple
#

^ see

rose warren
#

Lol my bad then

#

Yes I actually have it on my website too lol

slender wagon
#

oop

#

one sec

#
<meta name="theme-color" content="#03fcdf">

#

this doesn't seem to be working

rose warren
#

Is it in your page <head>?

slender wagon
#

let me recheck

#

nope

#

let me push the update

rose warren
#

Must be in <head>

#

Meta tags always go in the document head

slender wagon
#

yepp lesson learned thanks

rose warren
#

No problem! 😊

#

That'll change the navbar color in Chrome on mobile devices too fyi

earnest phoenix
#

how can i detect if a url is an image

quartz kindle
#

read the content-type header

vivid fulcrum
#

welllll

#

i explained it here

dusky lagoon
#

whats the difference between using a online open source API and a website get data .json file

#

Beceuse

frozen snow
#

wdym?

#

k

#

@opaque fern now it’s saying pull is not defined

#

how do I do that

#

sry I’m new to coding

dusky lagoon
#

im still learning hahaha

misty sigil
#

@sinful belfry oi

umbral zealot
#

@rustic nova spam

copper cradle
sinful belfry
rustic nova
#

big cringe

sinful belfry
#

#general if you would like to have a conversation unrelated to development

marble juniper
#

I have an array of objects
and each one has these 2 properties

how do I get the object that has the highest ping and how would I get what index in the array it is

#

thought about Math.max but it doesn't return an index

#

lol

#

hmmmmmmm
maybe I can use the find function?

#

idk

lament ruin
#

idk just loop through the whole array

sinful belfry
#

i guess you could use the sort function then take the first element (or last, depending on whether you sort it in ascending or descending order), but it is probably quicker to just loop through the array

marble juniper
#

im using typescript btw

#

lol

lament ruin
#

why? fancy functions like find() and sort() are basically loops too

marble juniper
#

ik it doesn't change how js works but yeah just wanted to mention

#

lol

copper cradle
#

so you already knew about the sort and find methods, yet came here to ask?

lament ruin
#

i think it would be slower

pearl trail
#

<array>.sort((x, i) => i.ping - x.ping) try this?

lament ruin
#

sorting it would be slower

sinful belfry
dire obsidian
copper cradle
#

oh no my bot now takes 0.4ms more to do a command

sinful belfry
#

meh, all adds up as more data is added

#

big O notation stuff i believe

lament ruin
#

yeah, well. @marble juniper only wants the index of the highest one. Theres no need to reorder it

modest maple
#

considering even big bots spend most of their time waiting on IO

#

its not really a big issue

marble juniper
modest maple
#

sorting also if it's inbuilt will likely use something like a timsort which is plenty quick enough

marble juniper
#

this is my solution now

lament ruin
marble juniper
#

lol

pearl trail
#

ah yeah

marble juniper
#

just do Math.min

#

a map function

#

and then find

#

the object that has that ping

#

lol

modest maple
#

what is players in this case?

#

seems to be like a binary tree would be well suited for this

marble juniper
#

if you wanna know the properties

#

lol

quartz kindle
#
const n = (((((((header & 0XF) << 16) + d.data.charCodeAt(d.cursor++)) * (2 ** 16)) + d.data.charCodeAt(d.cursor++)) * (2 ** 16) + d.data.charCodeAt(d.cursor++)) * (2 ** exp))
``` dafuq am i doing
misty sigil
#

Nobody knows.

quartz kindle
#

lmao

woeful pike
marble juniper
#

lol

#

I would never code like that

#

never in a million days

#

even my formatter would just wrap it

#

lol

modest maple
#

this is my life bloblul

quartz kindle
lament ruin
# marble juniper

Faster way of doing it

let highestIndex = 0
for (let i = 0; i < array.length; i++) if(array[i].ping > array[highestIndex].ping) playerHighestPing = i
#

replace array with the name of the array you're using

boreal iron
quartz kindle
#

ik

#

some are unnecessary, but

boreal iron
#

Not all

quartz kindle
#

i get screamed at

#

"no mixed operators rule"

#

xD

boreal iron
#

I wonder who would ever use () as line brackets

#

FUCKING PHONE!1!
If I want to write LINE than fucking let me

#

God damn

quartz kindle
#

xD

#

i'll probably just split it into multiple vars

#

its the only sensible thing to do

boreal iron
#

Auto correction... what a bullshit

blissful coral
#

hm

marble juniper
marble juniper
#

it looks cleaner

blissful coral
#

LINK
STILL NO RESPONSE FROM GIT

marble juniper
marble juniper
#

I mean

#

they got flooded after corona virus kicked

#

kinda

#

so it can take a while

blissful coral
#

true

marble juniper
#

even with school issued emails

#

so just wait ig

lament ruin
marble juniper
lament ruin
#

well, yeah

marble juniper
#

idc about how fast the method is

#

lol

#

that doesn't matter

#

to me at least

lament ruin
#

it's twice as slow

marble juniper
#

idc

#

do I look like I care at all

lament ruin
#

idk

marble juniper
#

twice as slow is still a matter of milliseconds

#

lol

lament ruin
#

depending on the length of the array

#

but yeah

marble juniper
#

its not long

#

lol

#

its only like

#

50

#

at max 150

#

so yeah

lament ruin
#

then you can do whatever you want

marble juniper
#

my cpu isn't dogshit anyways so its fast anyways

#

lol

#

and im not working with arrays that have thousands of objects

lyric mountain
modest maple
quartz kindle
#

hmm :^)

lyric mountain
#

is totally messed

modest maple
#

That's the background design LOL

misty sigil
#

nah its just broken

quartz kindle
#

its kinda hard to read lmao

misty sigil
#

i wanna code but i have no idea what to code

quartz kindle
#

thats transparency without blur right?

quartz kindle
misty sigil
#

make it public

#

lights flickering at 3am

lyric mountain
#

Call it Strobot

misty sigil
#

if i had lights that could do that i'd totally set that up

#

with a camera on the light as well lmao

lyric mountain
#

Make a bot that controls ur tesla

#

Then make it public

misty sigil
#

lmao

#

waking up to your car at the co-op filled with pot noodles or something

lament ruin
#

a bot that controls your amazon account

quartz kindle
#

twitch plays driving a tesla

misty sigil
#

i could make a website thing that does the light thing

lyric mountain
#

Sadly tesla lib is python

quartz kindle
#

just port it to js

lyric mountain
#

Uncaught exception, brakes.exe has stopped working

misty sigil
#

ohno

grizzled raven
#

in react, if you were to make a state variable from a value returned from a hook, how would you do that? something like

const { data: students, error } = useCustomFetchHook("/api/students")
const [student, setStudent] = useState(students?.[0])
earnest phoenix
#

j

grizzled raven
#

on the first render, students isn't present, so the state gets set as undefined and can't be changed

woeful pike
#

are you using a library like react-query?

#

it's a bit of an antipattern to take the results of a fetch response and put it into state. Libearies like react-query or useSWR will use the fetch result as a state itself

cloud agate
#

what the best site to host a bot for 24/7 rn i use relp.it???

earnest phoenix
#

okay

cloud agate
#

kk

earnest phoenix
#

here

#

wait here

cloud agate
#

kk

earnest phoenix
cloud agate
earnest phoenix
#

you can update

cloud agate
earnest phoenix
#

from inside your ide

cloud agate
#

kk

earnest phoenix
#

without pushing on github

#

kk

#

🚶‍♂️

cloud agate
#

brb

earnest phoenix
#

okay

#

:3

quartz kindle
#

why post a video lul

#

just say heroku

#

which btw is not that good of a host

#

for many purposes repl.it will be better and/or easier to use

earnest phoenix
#

hi can i promote my server

quartz kindle
#

no

earnest phoenix
#

why

quartz kindle
#

you can add it through the top.gg website

#

but you cant promote it here

thick nexus
#

when does on_disconnect trigger

#

ive never used it lmao

lost mauve
#

when your bot leaves voice ig

#

^this makes more sense

earnest phoenix
#
await interaction
^^^^^
SyntaxError: await is only valid in async function
    at Module._compile (internal/modules/cjs/loader.js:703:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)
    at internal/main/run_main_module.js:17:11

#

When I created this


await interaction
  .getApplicationCommands("811593908751564812")
  .then(console.log)
  .catch(console.error);

thin echo
#

how do you do that?

earnest phoenix
#

Just created in index.js

thin echo
#

The fancy thing where you put your code in a box

earnest phoenix
lost mauve
thin echo
#

IT WORKED

#

woah

#

ty

quartz kindle
earnest phoenix
#

Okay

lost mauve
#

nvm

earnest phoenix
#

Which is good module for slash command

#

I use erela.js
Also using command handler I wanted to add slash in all...

grizzled raven
# woeful pike it's a bit of an antipattern to take the results of a fetch response and put it ...

i am actually using useSWR by the way, and that's why i was asking
what i ended up doing was setting the state when the data has arrived, something like -

const { data: students, error } = useSWR("/api/students")
const [student, setStudent] = useState(null)
if (!student) return setStudent(students?.[0]), null

the reason why i wanted to put it into a state in the first place was to allow switching between the students

#

if there's a better way to go about that let me know

sly path
#

Ž\/“‘’₽

#

/

#

I’ll give u nothing If u give me nitro

#

sry wrong server

thin echo
#

lol

carmine summit
#

how do I push an item to an array then remove it after x seconds?

#
arr.push(str).then(str => setTimeout(arr.splice(indexOf(str), 1), ms));
boreal iron
#

If your array won’t change than just use push() and timeout(pop())

carmine summit
#

im just going ot settimeout it

boreal iron
#

That’s what I wrote yes

carmine summit
#

I mean

#

using idexOf

boreal iron
#

Instead of slicing use pop()

feral arch
#

Hi (: if I host a bot with Heroku, could I just register my credit card and have it on during the entire month?

carmine summit
#

yes but you will be billled after the first month

#

iirc

boreal iron
#

Well I said if it doesn’t change, if it does you can’t use pop of course

carmine summit
#

is setTimeout, a promise???

feral arch
#

hmm

#

so, what options do you recommend to host?

carmine summit
#

replit

boreal iron
#

Nope

feral arch
carmine summit
boreal iron
#

Just to tell you before I go offline push() isn’t a promise, push().then() makes no sense and won’t work

old cliff
#

you can make it a promise tho... if you want to make delay functions

boreal iron
#

Told him already

#

Doesn’t make sense to create a promise just because he wanna add a simple timeout after pushing an element

#

More work less or similar effort

latent heron
boreal iron
#

But his version will throw an error anyways but I told him why already

#

Which lets me sleep well right now okeh

earnest phoenix
#
(node:14965) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Access
    at RequestHandler.execute (/rbd/pnpm-volume/6aa01aae-6f57-434c-8446-c7b36c7ba822/node_modules/.registry.npmjs.org/discord.js/12.5.1/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:88:5)
    at async RequestHandler.push (/rbd/pnpm-volume/6aa01aae-6f57-434c-8446-c7b36c7ba822/node_modules/.registry.npmjs.org/discord.js/12.5.1/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
(node:14965) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14965) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
old cliff
#

he could do

const wait = (time) => {
return new Promise((resolve) => {
  setTimeout(resolve,time);
});
}

Array#push;
await wait(1000);
earnest phoenix
#

It have admin perms 🙄

boreal iron
old cliff
#

He wanted this

#

🙂

boreal iron
#

how do I push an item to an array then remove it after x seconds?

#

I don’t think so

old cliff
#

why even push?

boreal iron
#

Yeah that’s what I asked myself too

old cliff
#

you could directly do stuff

boreal iron
#

That’s why I said stopping the script to await a timeout, how would that makes sense?
Just sleep(x)

#

Same result oldEyes

#

Gonna sleep now... you will do I believe in you

soft glade
#

I have a status that shows how Manet servers its in and I was wondering if I can make it change automatically I’m using discord.py

sour flame
#

can I see?

earnest phoenix
#

im looking for a developer

#

i can pay

earnest phoenix
#

ty!

hallow vortex
#

p!bump

twilit geode
#
public class Test implements CommandExecutor {

    @Override
    public void execute(CommandData data, ArrayList<Command> commands) {
        // TODO Auto-generated method stub
        ArrayList<String> args = data.getCommandMessage().getArgs();

        for (int i = 0; i < args.size(); i++) {
            data.getChannel().sendMessage("arg " + i + " = " + args.get(i));
        }
        // test for command
        for (int i = 0; i < commands.size(); i++) {
            if (commands.get(i).getCommand().equals(args.get(0)))
                data.getChannel().sendMessage(commands.get(i).getCommand() + " is a command that matches args 0");
            else
                data.getChannel().sendMessage(commands.get(i).getCommand() + " is a command that does not match args 0");
        }
    }
}

javacord
so what this does is it goes through the list of commands and it sees if anything matches, Is there a more efficianent way to do this or do I have to check every one

#

just for testing it sends a message if it matches and if it doesnt but, I would theoretically break the for loop and continue if the if statement ever returned true.

sudden geyser
#

I'm assuming the CommandData and Command classes are custom or extensions not from Javacord (I haven't used the library, but seeing the docs say so).

The code you've shared seems satisfactory in that situation. You could make it cleaner by replacing raw loops with higher level loops (e.g. for (String arg : args) {...} and for (Command command : commands) {...}).

And yeah, you could (and should since nothing should match afterwards) break from the loop once a command is found.

twilit geode
sudden geyser
#

forEach would be fine if you didn't need to break out of the loop

twilit geode
#

and yes, CommandData and Command are part of the commandhandler

twilit geode
sudden geyser
#

lambdas notlikenoot

twilit geode
#

shhhhh

#

they might rebel

earnest phoenix
#

in discord.py how can I make a cmd where the bot creates a role with admin perm?

hot kiln
pale vessel
#

Yeah

earnest phoenix
earnest phoenix
pale vessel
#

Read your library documentation

hot kiln
#

i am making a mute command

#

just needed help with the cogs

solemn quartz
#

guys, one quick question, to make an automod that can be enabled/disabled, do i need a db?

cinder patio
#

yes

solemn quartz
#

k

#

do you know any simple to use free db?

hazy sparrow
#

quick.db

#

its quick

#

And a db

solemn quartz
#

hm

modest maple
#

In reality its not quick

solemn quartz
#

seems good

modest maple
#

Most DBs are free

#

You just need to host them yourself

#

Most cloudbased dbs like firebase are just complete rip offs lul

solemn quartz
#

what

#

so what do i need to do

#

im not english

#

lets just search "good free db discord" on google

#

or just install quick.db

#

or mongoDB

blissful cliff
#

mongodb is fairly easy as its query api uses json, though i would recommend to watch out if you use something like javascript, as its a headless database

cinder patio
#

headless database??

blissful cliff
#

basically, mysql isnt headless, you have to define what youre throwing in
mongodb is headless, any json you insert, it just saves it, doesnt care if a field didnt exist or if record fields differ from eachother

cinder patio
#

Never heard someone calling it headless

blissful cliff
#

wait, i might be using the wrong word then, im only running on a few hours of sleep

#

i might be referring to NoSQL and just messing up with something else, dont know what though

cinder patio
#

It's all good lol

modest maple
#

You mean its schema-less

blissful cliff
#

i still have a question of my own, asked it yesterday aswell so hopefully someone that knows will see.
but is there a correct way to do blue-green deployment for a discord bot?
in order to swap out for a new version without downtime but also without having the bot send 2 responses to a single message due to 2 instances running?

blissful cliff
modest maple
#

What we do is have a standalone gateway and then stateless workers the connect to our internal gateway via rabbitMQ

#

But it comes with its disadvantages as every worker can get any message from any guild via the event which means you cant really do locally cached stuff

blissful cliff
#

i hoped there wouldve been a solution with something like sharding, ive only heard something about it for bot scaling or something? but i dont know if itll actually be possible to help with it

#

i just cant really find a solution for it unless i can find a way to control responses from multiple bots at once or if the discord api has a solution honestly, because checking for a message from itself would be a 50/50 solution with the delays probably

blissful cliff
#

simple fix, but message.content.replace('bıdık ', '', 1) ?
might be square brained though, because i have no idea what the python library is capable of

cinder patio
#

I don't think replace has 3 parameters

modest maple
blissful cliff
#

whats your code atm? feels like you should add an if statement so that the bot ignores itself

#

oh no, here. placed the replace at the wrong spot

async def on_message(self, message):
  if message.content.startsWith('bıdık'):
    response = get_response(message.content.replace('bıdık ', '', 1))
    await message.channel.send(f"{message.author.mention} {response}")
modest maple
#

That's what implements the actual ipc messaging

blissful cliff
#

no problem at all

blissful cliff
earnest phoenix
#

shit coding but confused

#

one sec

#

let me ss

modest maple
earnest phoenix
#

global prefix; prefix = "$"
now trying to change ^ with
import god.config as c
c.prefix(message)
^ returns str is not callable

blissful cliff
earnest phoenix
#

yes im dumb for not making config a json

#

and if i do c.prefix(str(message)) same shit

slender thistle
#

what is god.config

#

and what is god.config.prefix

#

if it's a dictionary use keys

earnest phoenix
#

and god.config is just a class

#

with globals

slender thistle
#

prefix is a string so idk what you're trying to do with it

earnest phoenix
#

change it goon

slender thistle
earnest phoenix
#

wait

#

this is probably cancer to look at

#

i use sharex, will links work in here?

zenith terrace
#

yes

slender thistle
#

What are you trying to do with prefix

#

it's a string so why are you calling it like a function

earnest phoenix
#

trying to make it changeable

#

usings cogs so multiple files yknow

#

shouldve just made it a json but wayyy too late for that

copper cradle
#
x = "hi"
x("sup")
#?? wtf
earnest phoenix
#

yes now

#

when i do that

copper cradle
#

that's now how it works

earnest phoenix
#

str is not callable

#

no like

#

huh

copper cradle
#

what do you expect to happen when you call a string like a function

#

it's like doing
"hi"("yes") and expecting it to do something

earnest phoenix
#

no

copper cradle
#

then

earnest phoenix
#

if i do

#

global prefix

#

prefix = message

#

not going to work either

slender thistle
#

It's not too late to readjust your prefix system

#

You just replace the prefix string with an empty dictionary aka {} and then use prefix.get on it

earnest phoenix
#

in class config?

#

ye

#

huuh

#

o

slender thistle
#

tbf

earnest phoenix
#

me rn

#

then id use .update i assume

#

I'd only use update if I were to update multiple keys

#

oh ye im dumb

green kestrel
#

fucks sake. i was up till 3:30am trying to get my lightweight websocket code to work.

#

it turns out that discord's servers assume something that is optional

#

basically, you cant send a frame to discords gateway that doesnt have the MASK bit set

#

even though according to the spec setting MASK is optional... so you have to set MASK to 1, and then set the mask xor values to 0, because any value xor zero is itself

#

massive facepalm.

#

i couldnt fix it last night, passed out over tired at 3:30am, to get up this morning and try again. i decided to turn on the lowest level of debugging on websocketpp and see what it was sending. that was the only difference, well that and gzip compression of the frames

#

it's now changed my error i get back from 1002 to 4004, 4004 being invalid token, which is what i expected to get.

slender thistle
earnest phoenix
#

Shivaco now if i change prefix and i have command_prefix=prefix.get("prefix") will it update automatically or do i need to run a check?

#

probably need to check if it was changed ?

#

You should pass a callable instead

#

prefix.get just returns static string

#

ooh

slender thistle
#

I'm watching R6 videos

#

so what's going on here

#

you want to create a function specifically to pass it into command_prefix

#

from the given args iirc it's message and the bot client?

earnest phoenix
#

yeah, the client is the first iirc

#

yea

slender thistle
#

hold on I did that boodooboo at some point

#

and I cba to rtfd rn

earnest phoenix
#

well, since you don't need both, you could just do *args to ignore them trol

slender thistle
earnest phoenix
#

oh my

#

w3schools is a lifesavor btw

slender thistle
opal plank
slender thistle
#
async def get_prefix(bot_obj, message):
    if message.guild:
        try:
            return commands.when_mentioned_or(bot_obj.prefixes[message.guild.id])(bot_obj, message)
        except KeyError:
            bot_obj.db.prefixes.insert_one({"guild_id": str(message.guild.id), "prefix": "*"})
            bot_obj.prefixes[message.guild.id] = "*"
            return commands.when_mentioned_or('*')(bot_obj, message)
    return commands.when_mentioned_or('*')(bot_obj, message)

still wondering how my code manages to run even

earnest phoenix
#

wtf

#

my changeprefix code works now but since .get is static im fucked

#

shiv, you can omit the return in the except lol

#

couldnt i just be janky and reload the main load.py

#

lmfao

#

Just make a function that takes client and message object, and return the prefix.get from there. The function then will be passed to the command_prefix parameter

#

lets see how janky i can make it first

#

lambda *args: prefix.get(...) should work doe

#

too much work janky time

#

thank you guys everything is perfect now

#

much love

onyx hare
#

How does the “/“ integration work? I wanna test it out on my dummy bot

latent heron
#

slash commands?

onyx hare
#

Ya

latent heron
neon current
#

Hey, uh, I just wanted to ask if this is the right way to make a MUTE command in discord.py:

    @commands.command()
    @commands.has_permissions(manage_roles=True)
    @commands.guild_only()
    async def mute(self,ctx,member : discord.Member,*,reason:str="Because"):
        guild = ctx.guild
        mutedRole = discord.utils.get(guild.roles,name="Muted")

        if not mutedRole:
            mutedRole = await guild.create_role(name="Muted")

            for channel in guild.channels:
                await channel.set_permissions(mutedRole, speak=False,send_messages=False, read_message_history=False,read_messages=False)

        await member.add_roles(mutedRole,reason=reason)
        await ctx.send(f"Muted {member.mention} for reason {reason}")
        await member.send(f"You were muted on {ctx.guild.name} for reason {reason}")
earnest phoenix
#

id allow them to read messages and history, add_roles with reason?i could just be dumb though

#

it'll show in the audit logs

rocky dagger
#

when i run this i just get defined in the console even tho i am saying something```js
module.exports = {
name: 't',
description: 'test',

async execute(message, args) {
    const filter = (m) => m.author.id === message.author.id && !message.author.bot;
    //message.channel.send('Moved conversation to DMs');
    message.channel.send('say something')

    const msg = await message.channel.awaitMessages(filter, { max: 1, time: 10000 });
    console.log(msg.content);
}

};```

cinder patio
#

what?

#

what is getting console logged

rocky dagger
#

console.log(msg.content);

#

that just gives me undefined

slender wagon
#

message.content should do it

#

Oop

#

Wait

rocky dagger
#

msg is a variable

cinder patio
#

And you send a message in the next 10 seconds after you call the command?

rocky dagger
#

yes

cinder patio
#

msg is a collection

#

of messages

rocky dagger
#

changed the variable to "fsalg" and still didnt work

cinder patio
#

what... how would that change the problem

#

already told you, msg is a collection of messages

#

to get the first message do msg.first()

inland pulsar
rocky dagger
#

haha

devout chasm
#

faker

twilit rapids
bold dock
near stratus
#

...

onyx hare
#

Excusemewhat I’m not after emotes why did I get this error

#

Oh

earnest phoenix
#

That sometimes happen, you can ignore that

woeful pike
#

that sounds like a dns error

rocky dagger
#

i need do detect if a user react on a message with a specific reaction and i have looked around on google a bit and i haven't found anything that works for me. i always get an error where something isn't defined

crimson vapor
#

well the issue is that you are copying and pasting code without understanding it

#

if you knew what it was doing, you wouldn't have something undefined

rocky dagger
#

i know i dont understand what i am doing

crimson vapor
rocky dagger
#

this is one of the things i have triedjs if(emoji.name === '👍') { }

#

i am not that smart

#

and this is the error i getemoji is not defined

crimson vapor
#

what should emoji be?

earnest phoenix
#

Because emoji is not defined

#

¯\_(ツ)_/¯

wheat valve
#

How could i get something like "id" or "guild" from this using eris? Every attempt I've made is showing undefined.

crimson vapor
#

thats an array of members

#

so you would need to get the member ex. arr[index].id or arr[index].guild.id

slender thistle
earnest phoenix
rocky dagger
# rocky dagger i need do detect if a user react on a message with a specific reaction and i hav...

Ill try again. What i have done is asking a few questions then i put those answers in an embed to show the answer to the user and check if he didnt make any mistakes. After that the bot is reacting with 👍 and 👎 and if you are happy you react with 👍 and it will be send to a dedicated channel but if you react with 👎 it does nothing. Where i am stuck and need help is for the bot to detect if a user reacts with ether 👍 or 👎

winged linden
#

after discord adding slash commands for bots i cant use my own bots commands if there is rythm bot in the server, should i change the prefix and just not use "/"

umbral zealot
#

You should consider it, yes. it's not just about rhythm, it's just not a good prefix overall

#

You already had a conflict with the core discord features, but now you have more conflict, so... yeah, change it.

winged linden
umbral zealot
#

Yes, you could also do that.

winged linden
#

thanks for the help!

rocky dagger
# rocky dagger Ill try again. What i have done is asking a few questions then i put those answe...

this is the code i currently have```js
module.exports = {
name: 't',
description: 'test',

async execute(message, args) {        

    const testBounty = new Discord.MessageEmbed()
    .setColor('#0099ff')
    .setTitle('Bounty')
    .setDescription('React 👍 if this is correct and react 👎 if this is wrong')
    .addFields(
        { name: 'WANTED', value: Placeholder, },
        { name: 'Condition To Claim', value: Placeholder, },
        { name: 'Reward', value: Placeholder, },
        { name: 'Additional Info', value: Placeholder, },
    )
    message.channel.send({embed: testBounty}).then(embedMessage => {
        embedMessage.react('👍');
        embedMessage.react('👎');
    });
    if(reaction.emoji.name === '👎') return;  //here is where i need help
    if(reaction.emoji.name === '👍') {        //here is where i need help

        const Bounty = new Discord.MessageEmbed()
        .setColor('#0099ff')
        .setTitle('Bounty')
        .addFields(
            { name: 'WANTED', value: Placeholder, },
            { name: 'Condition To Claim', value: Placeholder, },
            { name: 'Reward', value: Placeholder, },
            { name: 'Additional Info', value: Placeholder, },
        )
        return message.channel.send(Bounty)
    }
}

};```

umbral zealot
#

What you need is a reaction collector.

#

you're missing that

#

you'll need to attach that on the embedMessage variable.

grim sinew
#

I am having a strange issue writing in Discord.py
Whenever I try to do a @sour pine.command it doesnt work

#
import discord
import os
from discord.ext.commands import Bot
from discord.ext import commands
from keep_alive import keep_alive
import random
import json
from prsaw import RandomStuff

rs = RandomStuff()

response = rs.get_ai_response("How are you?")
print(response)

#rs.close()

client = commands.Bot(command_prefix = "&")
bot = commands.Bot(command_prefix = "&")

commandList = "Here is a list of commands!\n \n&help: Displays this message\n&whomadeyou: Displays the username of the bot developer"

@client.event
async def on_message(message):
    if message.author == bot.user:
        return

    if message.content.startswith("&aichat"):
        print("Hello World!")

    if message.content.startswith("&whomadeyou"):
        await message.channel.send("GhostbusterJeffrey#5377")

    if message.content.startswith("&help"):
        await message.channel.send(commandList)

@client.command()
async def test(ctx, arg):
  await ctx.send(arg)

@client.event
async def on_ready():
    print('We have logged in as {0.user}'.format(client))
    await client.change_presence(activity=discord.Game('&help for help.'))

keep_alive()
client.run(os.getenv('TOKEN'))
#

When I go in my server and type &test hello it does nothing

rustic nova
#

Because you have nothing responding on &test

grim sinew
#

wdym

slender thistle
#

Uhm

#

Why two commands.Bot instances

feral aspen
#

Is there a string that allows me to disable strict mode?

rocky dagger
umbral zealot
#

try it

#

write it

#

see if it works

rocky dagger
#

i did

#

TypeError: message.channel.send.createReactionCollector is not a function i get this error

umbral zealot
#

Right so why are you trying to attach that to message.channel.send?

#

that doesn't make any sense at all

grim sinew
#

I was trying to use on_message event for shorter commands like &help and such but i guess I cant

slender thistle
#

There's nothing bad with using the commands extension for small commands imo

grim sinew
#

oh god now im having another issue

#

discord.ext.commands.errors.CommandRegistrationError: The command help is already an existing command or alias

#

with this command

#
@bot.command()
async def help(ctx):
    await ctx.send(commandList)
    pass
slender thistle
#

bot.remove_command("help") right after declaring your bot object

#

P.S. I suggest you rely on bot.commands to list your commands dynamically instead of hardcoding them into a string

earnest phoenix
#
(node:9986) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
description: This field is required
    at RequestHandler.execute (/rbd/pnpm-volume/6aa01aae-6f57-434c-8446-c7b36c7ba822/node_modules/.registry.npmjs.org/discord.js/12.5.1/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:88:5)
    at async RequestHandler.push (/rbd/pnpm-volume/6aa01aae-6f57-434c-8446-c7b36c7ba822/node_modules/.registry.npmjs.org/discord.js/12.5.1/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
at async MusicClient.<anonymous> (/app/src/index.js:83:3)
(node:9986) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9986)
zenith terrace
#

would be better if you showed your code

thin echo
#

@long stirrup

#

What does your bot do?

#

or is that a bad question?

tulip ledge
#

does anyone know how to make regex for at 1-5 characters long that may be: [A-Za-z0-9] and [@$!%*#?&]
I got to this but it doesn't work: ^[A-Za-z0-9\d][@$!%*#?&]{1,5}$

long stirrup
#

@thin echo

thin echo
#

What is an aio bot?

long stirrup
#

all in one

normal sage
#

so it’s empty

soft glade
#

i have a status that shows how many servers its in and im trying to make it update on its own and i havnt gotten any closer heres what i have

@client.event
async def on_ready():
  print('Bot is online and to go {0.user}'.format(client))
  game = discord.Game(f"In {len(client.guilds)} Servers! | d/help")
  await client.change_presence(status=discord.Status.idle, activity=game)
thin echo
#

Mine is a fun bot

#

It has like 1 moderation command

long stirrup
#

wats ur bots name

thin echo
#

Lai

#

What about yours?

long stirrup
#

oh ok

#

AIO BOT lmao

thin echo
#

lol

soft glade
slender thistle
#

set up a task that cycles between statuses and sets them every few minutes

long stirrup
normal sage
#

it’s not recommended to change the status in on_ready

soft glade
normal sage
#

You can define a status in the place you’ve placed you prefix

#

I assume you’ve haven’t done that since you’re using client instead of bot..?

blissful cliff
tulip ledge
#

ty!

slender thistle
normal sage
#

sorry

#

but yeah try that idea first

soft glade
slender thistle
blissful cliff
#

question, does any of you handle chat ranks like meeseeks? and if so, how do you store user levels/ranks?
im trying to figure out a way to use a single map[server id](exp integer), but im terrible at math, is there an easy way to get like exponential levels from just an exp count?

normal sage
#

like SQLite3

slender thistle
#

You can use logarithms, sigma, and/or exponents

#

Probably trigonometric functions too 😛

normal sage
slender thistle
#

Mathematical operations

normal sage
#

Ah ok

blissful cliff
#

yeah, i store it in mongodb, but i mean more like, i got it as a single exp counter right now in a map where the key is the server id. but im also questioning how others do it, do they have an entire object with exp and level aswell and just make it tick or just have a single counter aswell

slender thistle
#

I'd believe they have an object with level and current exp

feral arch
#

Hi (: I want to run my bot using ts, after compiling with tsc and executing node index.js I have the following errors:

SyntaxError: Cannot use import statement outside a module

Someone knows how could I fix it?

long stirrup
#

im trying to host my bot everywhere but it aint working

#

can someone help me

slender thistle
#

What have you tried in that "everywhere"?

blissful cliff
#

oh i just remembered why i did it like this, database updates are easier as i can just increment the value instead of having to retrieve it and check the levels and exp.
but thank you, shivaco, i'll look a bit at logarithms, sigma and.or exponents? am terrible at math so i guess i gotta put some research into it

long stirrup
slender thistle
#

You can try fucking around with them too, just a side note

long stirrup
#

i did

slender thistle
#

It's kinda basic calculus

long stirrup
#

bruh\

#

pls some one help

slender thistle
blissful cliff
slender thistle
#

You'll get there eventually 😂

long stirrup
#

i host the bot but it nerver comes online 😦 Sigh

slender thistle
#

Are you sure it's not your code

long stirrup
#

wdym

lusty quest
#

(if you used a VPS)

long stirrup
lusty quest
#

did you have node installed?

long stirrup
#

yea ofc

lusty quest
#

did you keep the process open (shell)

blissful cliff
#

got a daemon running?

long stirrup
#

yea

lusty quest
#

did you get any errors in the console?

long stirrup
#

i saw lots of videos none help

long stirrup
#

can anyone help

lusty quest
#

did you have some sort of console.log() to show that your bot is online?

#

(preferable in the ready event)

long stirrup
#

yea i got it said logged in the bot
with the prefix and the token

#

and it said online

lusty quest
#

but it doesnt go online in discord?

long stirrup
#

yea

blissful cliff
#

shouldnt be the case, but maybe firewall blocking?

lusty quest
#

did you have more than 1 bot listed in the Discord Developers webpage?

#

firewalls should not block outbound traffic

lusty quest
long stirrup
#

yea i did

slender thistle
viscid gale
#

fr

blissful cliff
slender thistle
#

I'd be surprised if that was the case

lusty quest
#

i dont even think there is a firewall configured

long stirrup
#

i tried running the bot on my pc

#

it was online for like 5 min then it went off

lusty quest
#

sounds like a issue in your code then

long stirrup
#

no

#

can u try to run or somethin

lusty quest
#

a bot doesnt go offline for no reason

blissful cliff
#

have you tried a barebones discord bot to just test if it stays online with basically nothing?

lusty quest
#

did you got any error when the bot crashed, like one error that yells at you that you got ratelimited, or a unhandled rejection exists the process

lusty quest
#

enable the debug event, it maybe helps with finding a issue

long stirrup
#

can u help hosting

lusty quest
#

i wont host a random bot.

long stirrup
#

ah

long stirrup
lusty quest
long stirrup
#

i did but dint work

#

can u find the problem

#

?

#

@lusty quest

lusty quest
#

if you still have the vps

long stirrup
#

cant u do it on a node website

lusty quest
#

you need a vps, and i wont touch stuff like Repl.it

long stirrup
lusty quest
#

bcs:
its not designed for Bots
free hosts suck

long stirrup
coarse cipher
#

@long stirrup ever tried running the code on your pc?

long stirrup
#

yea

coarse cipher
#

Worked?

long stirrup
#

the bot came online for 5 min and then went off
when i did on my pc

#

can anyone try to run it

long stirrup
coarse cipher
coarse cipher
#

...

long stirrup
#

lemme upload it

#

i forgot how to upload lmao

#

@coarse cipher

blissful cliff
#

create a git repo, and it should show the basic commands to upload it if you made an empty repo

long stirrup
#

it has my token shit

blissful cliff
#

just go to the developer portal and generate a new one

feral arch
long stirrup
#

done should i send @blissful cliff

blissful cliff
#

im not gonna host unknown code like that, sorry, just assisted as to how to get it on github

long stirrup
#

can u check the code pls

blissful cliff
#

its 235 js files total, im not gonna debug your entire code, sorry, thats just way too much

long stirrup
#

umm can u check only some

slender thistle
#

I'm sorry what the fuck

blissful cliff
#

if you specify which ones you think is causing the problem, sure, but im not gonna look through an entire project

long stirrup
#

how do i download all the modules at ones

#

how to fix this

boreal iron
#

TypeError: Cannot read property 'channels' of undefined

long stirrup
#

yee bot worked

green kestrel
#

yay got my lib sending heartbeats 😄

#

it can keep a connection open now 🙂

boreal iron
#

Well I mean basically it's just reacting to the OP codes KEKW

green kestrel
#

yeah, i had to make a websocket lib first 😄

#

its all from the ground up in C++

boreal iron
#

oh, ah alright

green kestrel
#

my plan is to replace the one triviabot uses with something where i know how every bit of it works

boreal iron
#

before I knew djs exists I did my own ,with JS and PHP, too

#

lel

green kestrel
#

aegis has some threading problems im really fed up of fighting

boreal iron
#

sure nothing against self builds

modest maple
green kestrel
#

nice

#

heres a fact of the day

long stirrup
#

how to fix this

green kestrel
#

websockets have a low level ping/pong system built in

#

discord doesnt use it

long stirrup
#

help

boreal iron
#

TypeError: Cannot read property 'channels' of undefined

long stirrup
#

yea how to fix

boreal iron
#

<something>.channels...
your var something is undefined

long stirrup
#

no help is coming

boreal iron
#

what don't u understand?

long stirrup
pale vessel
#

Have you tried reading the error

modest maple
# green kestrel websockets have a low level ping/pong system built in

It's a inbuilt thing however not every websocket client treats them the same, which i imagine is why they originally chose to not use the inbuilt system, for example Firefox ws wont auto send a ping to the server but will auto respond to a ping (mostly) while chrome will do both, but equally both systems can be hit or miss

long stirrup
boreal iron
#

The stack trace is telling you the line

blissful cliff
pale vessel
#

Their bot is forked?

long stirrup
#

wrong bot

boreal iron
#

You should start learn the basics of your programming language before copying stuff and trying to edit it.

modest maple
long stirrup
#

i was trying to get it to work

#

i alr have my own bot

modest maple
crystal wigeon
#

hey umm

#

i really need help with ELK stack

#

pls help

#

;-;

long stirrup
crystal wigeon
long stirrup
quartz kindle
#

are you gonna get an elk?

crystal wigeon
#

xD

boreal iron
quartz kindle
#

good luck stacking them

crystal wigeon
#

most likely my log files are gonna be the size of an elk

quartz kindle
#

they heavy

boreal iron
#

looks like a deer tbh

quartz kindle
#

fun fact of the day, js Math.pow and the ** operator are slow af sometimes for no reason

boreal iron
#

We got an fun fact of THIS day already.

#

Brain: heres a fact of the day

quartz kindle
#

well now you have one more

boreal iron
#

One fun fact per day is enough

quartz kindle
#

fine, i'll repost tomorrow

#

:^)

boreal iron
#

alright, gonna watch you, old men

modest maple
#

Fun fact of they day, Lua has possibly the fastest JIT compilers ever made capable of out performing even Native languages

quartz kindle
#

brb rewriting my bot in lua

boreal iron
blissful cliff
#

only fun fact i can think of in such a short time is that a giraffes nerve from the eyeball goes all the way down its neck to its shoulderblade and back all the way up to its brain... dont know if its useful for development but just be happy that our evolution isnt that stupid

crystal wigeon
modest maple
#

Gotta love it when you're getting Seg Faults and SigAborts in Rust mixed with Python sad

#

im getting the tools out to start manually sifting though memory pages lolkms

crystal wigeon
#

me trying to upload a damn .log file to kibana a_dead

marble juniper
#

gonna post something for newbies to read

green kestrel
#

hey there @quartz kindle 🙂

marble juniper
green kestrel
#

so i was up till 3:30am last night trying to get my lib to connect.... turned out discord have some oddities in their websocket server. couldnt fix it, fell asleep. within 30 mins of waking up i'd fixed it. I looked at what websocketpp did.

thin echo
#

What is a self bot?

green kestrel
#

@thin echo a bot using a client token

thin echo
#

I have been seeing those reasons a lot

green kestrel
#

theyre against the terms of use, you use one discord ban you

blissful cliff
#

arent like discord cli-clients seen as selfbots aswell technically?

#

or is that a seperate specific thing against tos?

marble juniper
#

If you are coding a Discord bot for the first time please read the following
A Discord bot is not a simple task. Sure, you can use a Discord bot to learn a language, but unless you are proficient in other languages it is not a beginner task.

A Discord bot consists of many different parts with varying degrees of complexity. As a developer you must be able to understand these components.

If you are interested in becoming a programmer or writing Discord bots in the future it is highly recommend learning a programming language to an intermediate level beforehand.

To fully learn a programming language, you can take a look at the respective guides pinned in the channel here.

Why am I asking you to learn a programming language properly?
Look at https://meta.stackoverflow.com/a/258208 for the reason why.

fluid basin
marble juniper
#

now I made my own Statement

#

lol

green kestrel
#

help vampires? why would i want to help vampires? they want to drink my blood!!!

flat bison
#

+startbot

marble juniper
#

but in this case they would drain ur nerves

#

lol

#

to some degree

quartz kindle
marble juniper
#

@quartz kindle also hi tim uwu

quartz kindle
#

yo guys check out how stupid this is

marble juniper
#

lol

blissful cliff
vivid fulcrum
#

id rather die then

blissful cliff
#

^^

marble juniper
#

id rather die than being immortal

#

lol