#development

1 messages · Page 1401 of 1

earnest phoenix
#

KEKW did'nt understand anything but ok

boreal iron
#

You split the content once and use the params array.

eternal osprey
#

and then use params[0] and params[1]

#

as it just got split right/

boreal iron
#

Yes

eternal osprey
#

aha okay got it

pure lion
#

any other files you need to see?

glad violet
#

I want to make
message.content("hey")
To lower case i tried to do it lower
Case and throw an error

earnest phoenix
eternal osprey
#

@glad violet what error?

boreal iron
#

If you don’t slice your command of the array params[0] will be your command and key index [1] your first argument, [2] your second etc.

eternal osprey
#

hmm yeah

glad violet
#

Cannot Find LowerCase of undefined
command not working

pure lion
#

jvxzjlhvdgsvjkhds

earnest phoenix
#

help me

eternal osprey
#

i did something but it still wouldn't work. I guess i did something wrong

pure lion
#
server {
    listen                  145.239.115.76:443 ssl http2;
    listen                  [::]:443 ssl http2;
    server_name             www.ale-bot.xyz;

    # SSL
    ssl_certificate         /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
    ssl_certificate_key     /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;

    # security
    include                 nginxconfig.io/security.conf;

    # reverse proxy
    location / {
        proxy_pass http://145.239.115.76:8080;
        include    nginxconfig.io/proxy.conf;
    }

    # additional config
    include nginxconfig.io/general.conf;
}

# non-www, subdomains redirect
server {
    listen                  145.239.115.76:443 ssl http2;
    listen                  [::]:443 ssl http2;
    server_name             .ale-bot.xyz;

    # SSL
    ssl_certificate         /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
    ssl_certificate_key     /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
    return                  301 https://www.ale-bot.xyz$request_uri;
}

# HTTP redirect
server {
    listen      145.239.115.76:80;
    listen      [::]:80;
    server_name .ale-bot.xyz;
    include     nginxconfig.io/letsencrypt.conf;

    location / {
        return 301 https://www.ale-bot.xyz$request_uri;
    }
}```
glad violet
#

Yes

earnest phoenix
pure lion
#

@earnest phoenix you dont have permission to do a global install

boreal iron
#

Check if params[X] exists and if not send a message to the user telling him he forgot to add a parameter

glad violet
earnest phoenix
pure lion
#

@earnest phoenix do you have root access?

earnest phoenix
#

@glad violet i have a pannel vps

pure lion
#

or sudo

eternal osprey
#
let params = message.content.trim().split(/ +/g);``` i tried accessing ```js
let raids = data.raids.filter(raid => getName(raid.pokemon_id).toLowerCase() === params[0].toLowerCase() && raid.level >= (params[1] ? params[1] : 5))``` well it did nothing \0/
pure lion
#

try sudo npm i -g <the package>

earnest phoenix
#

root access means ?

#

ok

boreal iron
#

Because params[0] is your command

#

(since you didn’t slice it off)

earnest phoenix
#

@pure lion error /entrypoint.sh: line 11: sudo: command not found

boreal iron
#

Your first parameter has the key [1]

pure lion
#

@earnest phoenix send a screenshot of the full screen

eternal osprey
#

hmm okay i got the first part

eternal osprey
#

i cannot do params[0].1 ofc

earnest phoenix
boreal iron
#

params[1]

eternal osprey
#

but i already did right?

pure lion
#

hm

boreal iron
#

Second parameter params[2] etc

eternal osprey
#

ooowh

#

i am stupid

boreal iron
#

Check if the parameter exists, it not the user didn’t put it behind the command

earnest phoenix
#

@pure lion hello

pure lion
#

alr

eternal osprey
#

@boreal iron man

#

i love you

#

so fucking much

boreal iron
#

Loving myself, too KEKW

earnest phoenix
#

lmao

#

@earnest phoenix why are u trying to install eslint

#

@earnest phoenix mentioned in discordjs.guide

#

i assume the host doesn't have a built in code editor

boreal iron
#

Gonna send the support bill to you okeh

earnest phoenix
#

u don't need to install eslint on your host

#

why

#

because it's a linter

#

ok

boreal iron
# eternal osprey i love you

Don’t forget to check if your parameter may is undefined. If so the user just entered the command without parameters

#

If so return your function by sending a message to the pleb who forgot to add the parameter

eternal osprey
#

got it!

boreal iron
#

Alright

eternal osprey
#

also, how do i return ${raid.ex_raid_eligible} (it is always between 0 and 1) as true or false?

#

(${raid.ex_raid_eligible}>0)

#

like this?

boreal iron
#

Is it supposed to be true or false?

eternal osprey
#

yeah

#

not what i thought it would be like lmao

boreal iron
#

if(raid.ex_raid_eligible) true; else false;

if(!raid.ex_raid_eligible) false; else true;

rocky hearth
#

Math.random() < 0.5 will randomly return true or false

eternal osprey
#

@rocky hearth it should not be random

#

i am pulling the data 0 or 1 from a site

quartz kindle
#

Boolean(raid.ex_raid_eligible)

eternal osprey
#

@quartz kindle it returns the image i sent above

boreal iron
#

The statement will be true if your var is true

quartz kindle
#

isnt that what you want? convert 1/0 to true/false?

eternal osprey
#

that is what i want

#

but look

boreal iron
#

Huh I thought the opposite

eternal osprey
earnest phoenix
#

@boreal iron looks like you making a bot for raid

eternal osprey
#

@earnest phoenix yeah i am

earnest phoenix
#

lmao

rocky hearth
#

Can I host node projects on hostgator?

boreal iron
#

Converting the boolean var to words?

quartz kindle
#

@eternal osprey then do what i said

eternal osprey
#

yeah i already used boolean

quartz kindle
#

the Boolean() function converts anything to true/false

eternal osprey
#

i think i should define it using var

quartz kindle
#

isnt that what you want?

boreal iron
#

lol

eternal osprey
#

no

boreal iron
#

You wanna have a Yes or No?

eternal osprey
#

exactly

quartz kindle
#

then you screwed up your code

eternal osprey
#

but it wipes all the other info

#

so i was thinking about defining it to a var

#

and later on calling it

boreal iron
#

Then check if(raid.ex_raid_eligible) "Yes"; else "No";

quartz kindle
#

where did you put the boolean?

#

show your code

boreal iron
#

Whether Tim doesn’t understand what you want or I or probably we both KEKW

quartz kindle
#

lmao

#

he said if he uses boolean, then the entire thing gets deleted

#

so he likely put it in the wrong place

boreal iron
#

Nah I thought he just wanna output the word yes or no based on the boolean var hr gets

quartz kindle
#

yes thats what he wants

boreal iron
#

In his embed

quartz kindle
#

but he said it deleted everything else

#

lmao

boreal iron
#

Oh I didn’t see that msg

boreal iron
#

That conversation confuses me ...

eternal osprey
#

yeah i probably placed it wrong

#

yeah i fxied it

#

really akwardly placed by me. Sorry

main trench
#

You could try self hosting its just done from inside your code editor example if you made a node.js bot in Visual Studio Code just type "node ." In your console and it runs the bot. Now as long as you have any errors that could occur patched just leave your pc on and your bot will be hosted 24/7

#

There is no form and you can't get your bot added anymore since discord put a limit to how many bots can be in a server

eternal osprey
#

damn i have put my disscord bot on top.gg 2 days ago

#

it is already on 30%

tribal siren
#

something's wrong i can feel it

regal creek
quartz kindle
#

console.log is the standard way of outputting/logging data

#

but the console.log function itself is a wrapper around std

#

you can use std streams directly if you want

#

they are lower level options

crystal wigeon
#

Hey, does anyone know how do you deafen the bot in voice channel?

#

there's a setDeaf method for member.voice

#

is there something similar for client?

quartz kindle
#

its the same

crystal wigeon
#

i wanna deafen the bot

#

not a user

quartz kindle
crystal wigeon
#

ah i was searching for "setDeaf"

#

thanks

pure lion
#

hey so

#

im trying to connect to my peer server behind nginx but the server doesnt seem to want to go up

sick fable
#

I coded a message logging command and here's my code-

@client.event
async def on_message_delete(message):
if message.guild.id in setlog:
embed = discord.Embed(title = f"Message Deleted!" , colour = discord.Colour.red())
embed.add_field(name = "Author of the message" , value = f"{message.author.name}")
embed.add_field(name = "Content" , value = f"{message.content}")
await ctx.send(embed=embed)

setlog = []
@client.command()
@commands.has_permissions(administrator=True)
async def setlog(ctx , channel = discord.TextChannel):
if ctx.guild.id in setlog:
setlog.pop(setlog.index(ctx.guild.id))
await ctx.channel.send("Sending deleted messages have been disabled")
else:
channel = await client.get_channel
log = snipe_list.append(ctx.guild.id)
await channel.send(log)
await ctx.channel.send("Deleted messages will be shown in that channel!")

#

Error - discord.ext.commands.errors.BadArgument: Converting to "ABCMeta" failed for parameter "channel".

#

Can someone help me please 🥺

#

@quartz kindle @slender thistle 🥺

sudden geyser
#

not = discord.TextChannel, : discord.TextChannel

sick fable
#

??

potent ocean
#

async def setlog(ctx , channel : discord.TextChannel):

sick fable
#

Oh I gotchu

sudden geyser
#

it'd also be useful to show what line the error is coming from.

sick fable
#

Mhmm

#

I got an another error

#

I'll ask it later

#

First I'll try and I will ask you guys afterwords

potent ocean
#

nah, I'm good

#

*rn

sick fable
#

Nice

pure lion
#

i have a peer server set up at https://www.ale-bot.xyz/peer and i want to connect to it but when i connect from the browser through client side peer, it tries to establish a connection to wss://www.ale-bot.xyz/peer. does anyone know a fix to this?

potent ocean
#

code?

pure lion
#

alright

#
const myPeer = new Peer(user.id, {
    host: "https://ale-bot.xyz",
    path: "/peer",
    port: 443,
    proxied: true
});
potent ocean
#

hmm, what is the line above it

pure lion
#

that

potent ocean
#

hmmm

#

that idk

pure lion
#

fek

#

off to stackoverflow i go

earnest phoenix
#

who speak french please ?

potent ocean
earnest phoenix
#

ok

#

i

#

speak english

#

who can help me for do a dashbord for bot discord please

#

?

#

@potent ocean

#

who can help me for do a dashbord for bot discord please
[14:29]
?

safe creek
#

is there anyway to make the bot respond to the user when they dont add an argument so for example !8ball then the bot would respond saying that you need to add some text etc. is that possible on discord.py?

quartz kindle
#

@pure lion afaik peerjs runs on websockets

#

you cant remove the wss

safe creek
#

if not will i need to install other software?

quartz kindle
#

@safe creek yes its possible

safe creek
#

ok

#

but how would i do it? anywhere i should look in the docs?

#

@quartz kindle

quartz kindle
#

message.content contains the content of the message

#

you need to check if it has args or not

safe creek
#

mmmmk

#

ty

quartz kindle
#

thats just string manipulation, not related to discord.py

#

its just python

safe creek
#

i see

#

shouldnt be too hard

#

thanks

leaden rover
#

How do I filter out NSFW subreddits with PRAW (on discord.py)?

pure lion
leaden lake
sick fable
#
async def on_message_delete(message):
    if message.guild.id in setlog:
        embed = discord.Embed(title = f"Message Deleted!" , colour = discord.Colour.red())
        embed.add_field(name = "**Author of the message**" , value = f"{message.author.name}")
        embed.add_field(name = "**Content**" , value = f"{message.content}")
        await ctx.send(embed=embed)
            
            
            
setlog = []
@client.command()
@commands.has_permissions(administrator=True)
async def setlog(ctx , channel : discord.TextChannel):
        log = setlog.append(ctx.guild.id)
        await channel.send(log)
        await ctx.channel.send("Deleted messages will be shown in that channel!")```
pure lion
#

@leaden lake line?

sick fable
#

Error - discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Command' object has no attribute 'append'

#

@pure lion can you please delete that message and send it now? Others will get confused

pure lion
#

what

sick fable
#

Nvm

#

Aah

pure lion
leaden lake
sick fable
#

@quartz kindle Bruh help me here

pure lion
#

@sick fable whats up

sick fable
#

@pure lion error and code above

pure lion
#

@leaden lake where is the error from?

sick fable
#

Help me what's the meaning of the error and I'll fix it

pure lion
#

there is no such thing as Command.append

leaden lake
quartz kindle
#

@sick fable you have 2 different things with the same name

sick fable
#

@quartz kindle Which one?

quartz kindle
sick fable
#

Hmmmm

pure lion
#

so then tim, would there be a way for me to have the server behind a reverse proxy like nginx?

#

i love me a good array funny

quartz kindle
#

google how to use websockets with nginx

#

you need to have an upgrade header

pure lion
#

alright

sick fable
#

I thought that's the way by how to make a logging thing @quartz kindle

#

😢

pure lion
#
proxy_set_header Upgrade           $http_upgrade;
#

i have that as a header

slender wagon
#
const Discord = require("discord.js");
const Command = require('./command');
const guilds = require('../data/guilds');

module.exports = class extends Command {
    name = 'say'; 
    category = 'General';
    async execute(client, msg) {
      if(!msg.member.hasPermission("KICK_MEMBERS")) {
        return msg.channel.send(`**${msg.author.username}**, You do not have enough permission to use this command`);
      }
    const sayargs = args.join(" ");
    msg.delete().catch(O_o=>{});
    msg.channel.send(sayargs)
    
    }}

It throws **Cannot read property 'hasPermission' of undefined **

leaden lake
pale vessel
#

@slender wagon Is it from a DM?

slender wagon
#

wym

pale vessel
#

msg.member won't exist if the message is not from a server

slender wagon
#

it is from a server

#

not a member

quartz kindle
#

console.log(msg)

slender wagon
#

ait

pure lion
#

i am the not know

#

brain hurty

slender wagon
#

it logs it correctly

pale vessel
#

Can you show the full output?

delicate shore
slender wagon
delicate shore
#

Hyperlink

#

On mobile

#

Pog

quartz kindle
#

@slender wagon if it logs test then no its not correct

slender wagon
#

oh

#

i ran #say test

quartz kindle
#

you are processing the message content

#

and passing the arguments as msg

#

so your msg is not a message, its actually args

slender wagon
#

oh okay

#

ty

earnest phoenix
pure lion
#

i am stuck

#

this is so infuriating

earnest phoenix
pure lion
#

switch ){

#

for

#

{})

earnest phoenix
#

okay

#

"SyntaxError: Unexpected token '}'"

pure lion
#

@misty sigil fix

misty sigil
#

what

#

@earnest phoenix the { and } should be before the closing bracket

earnest phoenix
#

let me see hold on

woeful pike
#

looks like you need to take a step back and go through the basics first before making a discord bot

pure lion
#

y- hic yeah tha' buuuuurp that

earnest phoenix
sage bobcat
#

One message removed from a suspended account.

earnest phoenix
pure lion
#

ok so like

#

there is a peer server there

#

lets ping tim

#

can we ping tim?

#

i can ping tim

#

i am going to ping tim

#

@quartz kindle

whole knot
#

Hello, I have a quick question. I have a command where you can create a moderator section. (Category, Text channel & voice channel.)
However you can execute the command how often you want and it would create the section again and again., I do not want that.
Is there a way if a server owner executes >modlog the second time the whole section and all the channels are deleted?
Which function do I miss in this code?

    @commands.command()
    async def modlog(self, ctx):
        """Creates a moderator category for you"""
        guild = self.bot.get_guild(id=ctx.guild.id)

        overwrites = {
            guild.default_role: discord.PermissionOverwrite(connect=False, view_channel=False),
            guild.me: discord.PermissionOverwrite(manage_channels=True, manage_roles=True,
                                                  view_channel=True, connect=True)
        }

        Category = await guild.create_category(name='Moderator', overwrites=overwrites)
        TextChannel = await guild.create_text_channel(name=f'management', category=Category)
        VoiceChannel = await guild.create_voice_channel(name=f"Mod-Voice", category=Category)
        e = discord.Embed(color=self.bot.color)
        e.title = "The Moderator section was successfully created!"
        e.description = f"Start off in: {TextChannel.mention}."
        await ctx.send(embed=e)

I also tried a await guild.delete_text_channel(discord.TextChannel.name) method but that did not work out

solemn leaf
#

how do I ping a member with message.member?

stray oak
sudden geyser
#

You may also need to whitelist the member to mention them when sending the message since you can set what mentions you're allowed to send.

#

assuming you're using Discord.js*

feral aspen
#

Wrong channel

solemn leaf
#

@sudden geyser so <@>

sudden geyser
#

Are you using Discord.js

solemn leaf
#

Yeah

solid snow
#

So I made a function that sends an embed with a reaction. I want to await the Reactions for the embed so what I did was

const msg = await sendEmbed()

msg.awaitReactions(...)

But I always get the error Cannot read property 'awaitReactions' of undefined.
Is there something special I need to do in the sendEmbed() function?

pale vessel
#

Make sure you return the sent message object for the sendEmbed() function

solid snow
#

I did return message.channel.send(embed) @pale vessel

leaden rover
#

This command:

@commands.command()
async def taxcalc(self, ctx, amount):
     """Calculates tax on Dank Memer - a useful command for tax calclulations"""
     if amount < 20001:                    
         embed = discord.Embed(title="Dank Memer Tax Calculator", description=f"Amount entered: {amount}")
         embed.add_field(name=f"Amount expected to pay:", value=f"{amount}")
         embed.add_field(name=f"Amount lost by tax:", value=f"0")
         embed.add_field(name=f"Tax rate:", value="0%")
         await ctx.send(embed=embed)```
Won't send anything, as soon as I do this amount :/
spark dawn
#

@leaden rover idk about py bots

#

sorry

leaden rover
#

well ok

hollow sedge
#

If you don't know then why even say that?

solid snow
old moss
#

Hello, I want to add a reaction to my bot message with that emoji 1️⃣ with discord.js but it cannot find him with that way:

const emoji = message.guild.emojis.cache.find(emoji => emoji.name === "one");
await msg.react(emoji);

Someone can help ? I don't find anything on docs when we want to react with a basic emoji that is not copy-paste inside code

solid snow
#

you can just use the emoji like that 1️⃣

old moss
#

That doesn't work, it crash

solid snow
#

so msg.react('1️⃣');

hollow sedge
leaden rover
#

I got it now

tardy hornet
#

TypeError: Cannot read property 'tag' of null

.setAuthor(channel.sender.tag,channel.sender.avatarURL())

old moss
solemn leaf
#

How can I do an array for checking if someone is whitelisted to do a command

solid snow
#

should still work @old moss

old moss
#

Yeah but with my find on guild.emoji get a null

solid snow
#

are you sure you did ```js
msg.react(':one:');

and not ```js
 msg.react(:one:);
solid snow
#

or 1️⃣

hollow sedge
#

If you don't know how to use arrays, you should probably learn JS first @solemn leaf

solemn leaf
#

["User", "user2"]

slender thistle
solid snow
leaden rover
#

ok

solemn leaf
#

@hollow sedge Yeah

old moss
whole knot
#

@solid snow Which reactions do you got? I just know on_raw_reaction_add

hollow sedge
solid snow
#

makes sense give me a second

solemn leaf
#

@hollow sedge I do know how to make one

solid snow
#
function sendEmbed() {
    const embed = new Discord.MessageEmbed()
        .setTitle('Test')
        .addField('\u200B', `Test`)
        .setTimestamp()
        .setFooter('React with :arrows_counterclockwise: to update this embed, or just run the command again!')
        return message.channel.send(embed)
        .then(message => {
            message.react(':arrows_counterclockwise:');
        });
    }

const msg = await sendEmbed()

msg.awaitReactions(...)
quartz kindle
#

you need to return the message

#

inside the then

solid snow
#

ohhh

#

let me try thank you

solemn latch
#

What happened to Him

quartz kindle
#

was defeated

#

by the powerpuff girls

boreal iron
#

his evil clone Tim won

solemn leaf
#

How can I do an array for checking if someone is whitelisted to do a command

old moss
#

When I tried await msg.react(bot.emojis.cache.find(emoji => emoji.name === "one")); I'm getting

solid snow
quartz kindle
#

do you have a custom emoji named "one"?

solid snow
#

use the unicode emoji

#

i think he just wants to ues the standard one emoji

old moss
#

Yes xD

solid snow
#

at least thats what he said

quartz kindle
#

the emoji cache is only for custom emojis

drifting wedge
#

how can i like show an image in html

solid snow
#

yeah use the unicode emoji 1️⃣

drifting wedge
#

but not have other stuff move

solid snow
#

@old moss

drifting wedge
#

likke 1 sec

old moss
#

The unicode emoji is "\:one:" ?

boreal iron
#

"staff" icon?

solid snow
#

unicode emoji would be 1️⃣

#

like that

#

just paste that into your code

boreal iron
#

@drifting wedge Which of those 2 images isn't doing what it should?

solid snow
quartz kindle
#

that wont work

solid snow
#

well it worked for me at least :/

quartz kindle
#

it wont

#

because the emoji cache is only for custom emojis

#

there are no standard emojis in the emoji cache

drifting wedge
#

the like unrendered one

solid snow
#

oh wait hes using the cache?

boreal iron
#

and what's the issue?

quartz kindle
#

yes hes trying to get it from the cache

boreal iron
#

tell me again please

drifting wedge
#

its being moved offcenter

old moss
solid snow
#

except you used msg.react

#

sorry

old moss
#

Yep it work now

solid snow
#

cool!

solemn leaf
#

How can I have like an array or json that has ids of people

old moss
#

Of a guild ?

drifting wedge
#

ignore it

#

its fine

solemn leaf
#

what?

boreal iron
#

@drifting wedge Ok back to you... it's not supposed to be in the middle?

errant perch
#

Is graceful-fs a good replacement for fs

drifting wedge
#

i moved it up to the top

#

ty tho

boreal iron
#

lmao alright

solemn leaf
#

How can I do soemthing like this

    if (message.author.id !== whitelist.users) {
        return;
    }
thick gull
#

is whitelist.users an array?

solemn leaf
#

Yeah

thick gull
#

well first

#

do you know how to check if something is included in an array

boreal iron
umbral zealot
#

yeah you want to know if the array includes the item 😄

#

god I wish we could create google search results as links in messages

solemn leaf
#

.includes?

thick gull
#

that’s easy just selfbot to post an embed with a hyperlink

#

yep

solemn leaf
#

okay I think I can do from here but can I comment in json?

thick gull
#

no I don’t think so

#

@umbral zealot smarter person please confirm

boreal iron
#

based on your example

umbral zealot
solemn leaf
#

it says whitelist.users is undefined

boreal iron
#

hmm? what did you do? post the line

solemn leaf
#
{
    "users": [
        "485987127809671168",
        "150647394344632320",
        "292946620759146496"
    ]
}
boreal iron
#

hmm and obj is called whitelist?

solemn leaf
#

yeah Im passing it though exports

cinder patio
#

Is that inside a json file or a js file?

solemn leaf
#

json

#

hello?

drifting wedge
#

how can i make my website show up on google

#

like when i search it up?

solemn leaf
#

First

#

meta tags

#

titles

#

etc

cinder patio
#

look into search engine optimization

drifting wedge
#

no like it literally doesnt show up

boreal iron
#

That takes a while, days, weeks or longer

solemn leaf
#

site: "sitename"?

#

@drifting wedge

drifting wedge
#

ook

#

it does show up then lmao

solemn leaf
#

google dorking always try it

drifting wedge
#

didnt know

glad violet
#

How to make my code to lower case

solemn leaf
#

@boreal iron

boreal iron
#

I'm here

sudden geyser
#

and are you referring to a string

boreal iron
#

string.toLowerCase()

glad violet
#

Ok

solemn leaf
quartz kindle
#

how did you load the json file?

solemn leaf
#

exports

weary torrent
#

Pydroid.3
Python

Watever...

Can some 1 pls dm me the code for a 8ball command but... With random hentai gifs??:

solemn leaf
#

const whitelist = require("./whitelist.json")

weary torrent
#

Ive been up the last 1 or 2 days xdd

Truing to figure it out

#

@solemn leaf

Happy 811 days on discord!!

#

XSS

#

XDD**

boreal iron
#

what does the log output for whitelist?

weary torrent
#

I have, 2 discord versions. 1 from happy mod so i can SEe hownold ppls accs are.

#

Holyy

#

@boreal iron 1480 DAYS XDD

boreal iron
#

dude, just keep your general talk to #general

weary torrent
#

Ok srrt

#

Srry**

solemn leaf
#

@lost berry

weary torrent
#

Pydroid.3
Python

Watever...

Can some 1 pls dm me the code for a 8ball command but... With random hentai gifs??

Ive been up the last 1 or 2 days xdd

Trying to figure it out

boreal iron
#

what does the log output for whitelist?
@solemn leaf

#

undefined as well?

weary torrent
#

Pydroid.3
Python

Watever...

Can some 1 pls dm me the code for a 8ball command but... With random hentai gifs??

Ive been up the last 1 or 2 days xdd

Trying to figure it out

sudden geyser
#

use the random module's choice function.

#

that's the most logic you need out of it.

hollow sedge
#

That's disgusting..but ok
Make sure to lock it to nsfw channels

outer perch
sudden geyser
#

keep in mind this is python

#

In JavaScript yeah you have to do that

#

in Python its ```py
import random

random.choice(seq)```

earnest phoenix
#

quick question, how do i remove value from an array?

#

i tried .pop[0] it doesnt work

outer perch
sudden geyser
earnest phoenix
#

.shift removes all elements but 1st one

boreal iron
sudden geyser
#

It removes elements starting at the front

earnest phoenix
#

args becoems only the 1st element

boreal iron
#

That's completely wrong assuming you wanna get the args behind the command

onyx hare
#

is there a better way to format the ping command? the one i keep using is ok but id like to upgrade it to show how long it took to ping to discord

earnest phoenix
#

i just wanna remove the 1st element

onyx hare
#

i use this

client.on("message", msg => {
    if(msg.content === `${prefix}ping`) {
        msg.delete({timeout:10});
        msg.channel.send({embed: {
      color: 46679,
      title: "Latency Ping:",
      fields: [
        { name: "Results", value:new Date().getTime() - msg.createdTimestamp + "ms", inline: true}
        
      ]
    }
  })
    }
});```
boreal iron
earnest phoenix
#

ok it worked idk why

#

tnx

crystal wigeon
#

hey guys is there an event i can use when someone votes for my bot on top.gg? like to get the users voted and then give them rewards etc

#

is there an event like client.on("message")?

earnest phoenix
boreal iron
#

If it requires to be live you will have to setup a webhook service (or related) and use DBLs option to send a webhook to you

crystal wigeon
#

i see

#

also do i need to be in more than 75 servers to put the bot on top.gg? i saw some vids and they said after 75servers is when you'll be able to verify your bot

boreal iron
#

It requires to know how webhooks work and how you can set up a webhook service, anything else does the DBL lib for you if you wanna use it

crystal wigeon
#

sure i'll look into that

#

was just wondering if discordjs lib itself has something similar

boreal iron
#

nope you can add your bot at any time

crystal wigeon
#

got it thanks

boreal iron
#

nope djs in fact has nothing to do with DBL

glad violet
#

music bot js stop command not working

              case 'stop':
                  var server = servers[message.guild.id];
                  if(message.guild.voiceConnection){
                      for(var i = server.queue.length -1; i >=0; i--){
                          server.queue.splice(i, 1);
                 } 
                      server.dispatcher.end();
               message.channel.send("Leaving...")
                      console.log('Leaved Succes')

                 }
                 
                 if(message.guild.connection) message.guild.voiceConnection.disconnect();
              break;
#

if u find the problem ping me

sudden geyser
#

It's your code. You tell us what's not working about it.

#

For example, if you look in the documentation, you'll see .guild.voiceConnection is not a thing.

#

But you'll see .guild.voice.connection is.

glad violet
#

...

#

i am using outdated commands

quartz kindle
#

yes

#

again

glad violet
#

its says cannot read end of undefined
server.dispatcher.end();

#

all commands is outdated 😦

#

why discord delete old commands

sudden geyser
#

on a scale of 1 to 10, how well would you say you're fluent in javascript

earnest phoenix
#

commands outdated?

glad violet
#

yea

earnest phoenix
#

wdym

#

are you using command handler thing

glad violet
#

where is the problem in that command
server.dispatcher.end();

#

end is outdated

earnest phoenix
#

use new one then :d

quartz kindle
#

thats not it being outdated

#

thats server.dispatcher not existing

glad violet
#

it is

quartz kindle
#

server.dispatcher is something you created, not a library thing

earnest phoenix
glad violet
#

i used server.dispatcher adobe in play command and works

#

it is

quartz kindle
#

server is an object you created

#

you assigned the dispatcher to it

#

its your reponsibility

glad violet
#

yea

#

var = server

earnest phoenix
#

how is server related to discordjs?

crystal wigeon
#

also quick question do i need to add DSL to my server?

earnest phoenix
#

you must be using command handler thing

crystal wigeon
#

before adding my bot

earnest phoenix
#

@crystal wigeon no

crystal wigeon
#

or is that field optional

earnest phoenix
#

only if u add servers

crystal wigeon
#

ah i see

#

thanks

glad violet
#

server.dispatcher.end();

#

it says Cannot read property 'end' of undefined

earnest phoenix
#

IT DOENST EXIST

#

can u show code where you create server

safe creek
#

will all my files in VSC be ran when i run the mail python file that has my bots token in?

quartz kindle
#

mail python file?

safe creek
#

yes so if i run my main file so that m bot goes online will all my other files run too?

#

so my eco, moderation, fun etc also run

quartz kindle
#

oh main

#

you said mail

#

lol

safe creek
#

oh

#

my bad

quartz kindle
#

only if they are imported

safe creek
#

my laptop is from france but on english setiings lmao

earnest phoenix
#

hello do you have turkish

safe creek
#

wdym imported?

#

import [file]

#

like that

#

@quartz kindle

earnest phoenix
#

How can I make the bot find the user with the name? I make this: js client.users.cache.find(user => user.name === args.join(" "))

hollow shuttle
#

?

sudden geyser
#

user.username returns the user's username.

#

You'll also need intents enabled to cache users to a reasonable amount for indexing.

earnest phoenix
#

oh

safe creek
#

lol

earnest phoenix
#

aj!botguilds

safe creek
#

...

safe creek
#

wrong channel @earnest phoenix

earnest phoenix
#

sorry

snow urchin
quartz kindle
#

what is the problem?

snow urchin
#

ima assume the single ' after name and boosters

blissful raft
humble rock
#

Error:

(node:22404) UnhandledPromiseRejectionWarning: Error: 400 Bad Request

Code:

const { MessageEmbed } = require('discord.js');
const request = require('node-superfetch');


module.exports = {
    name: 'google',
    category: 'Fun',
    description: 'Search something on Google',
    usage: 'f!google <query>',
    run: async (client, message, args) => {
        let googleKey = 'XXXX'
        let csx = " XXXX"
        let query = args.join(" ");

        if(!query) return message.channel.send("Unknow Search.");

        let href = await search(query);
        if(!href) return message.channel.send("Unknow Search.");

        let embed = new MessageEmbed()
        .setColor('BLURPLE')
        .setAuthor(`First Result for ${query}`)
        .setTitle(href.title)
        .setDescription(href.snippet)
        .setTimestamp()
        .setImage(href.pagemap ? href.pagemap.cse_thumbnail[0].src : null)
        .setFooter("Powered by Google", "https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/512px-Google_%22G%22_Logo.png");

        return message.channel.send(embed);

        async function search(query) {
            const { body } = await request.get("https://www.googleapis.com/customsearch/v1").query({
                key: googleKey, cx: csx, safe: "off", q: query
            });

            if(!body.items) return null;
            return body.items[0];
        }
    }
}

Where is the peroblem?

flint sleet
#

@stark abyss hey need help

stark abyss
#

Oh um

#

Okay

#

at least write the stuff before pinging

earnest phoenix
#

can someone check my script?

#
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/lorenzo/Desktop/Modbot-2.0/index.js:3:1)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/Users/lorenzo/Desktop/Modbot-2.0/index.js' ]
}```
#

¯_(ツ)_/¯

#

im not good at this

zinc shale
#

what happens when you get discord api banned

#

like do u have to make a whole new bot

#

yeah, i was hoping someone that did know would answer

azure spire
#

hi my javascirpt code i need help dm if i can help

snow urchin
#

and then dont abuse the api?

zinc shale
#

oh, alright, thanks

grizzled plinth
#

hi

azure spire
#

türk yardım edebilicek

#

varmı

grizzled plinth
#

ben

#

sorun ne

#

@azure spire

azure spire
#

register

#

kayıdı

#

kodu yazdım

#

ama

#

etiket ad gir kısmı çalışmıyo dm

#

gelirmisin

grizzled plinth
#

ark attım

#

kabul et

safe creek
earnest phoenix
#

can someone help me with my script i keep getting this error code

Require stack:
- /Users/lorenzo/Desktop/Modbot-2.0/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/lorenzo/Desktop/Modbot-2.0/index.js:3:1)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/Users/lorenzo/Desktop/Modbot-2.0/index.js' ]```
grizzled raven
#

if you broadcastEval, will the shard that called jt also do that eval?

earnest phoenix
#

idk

grizzled raven
#

then why answer pepeRun

earnest phoenix
#

¯_(ツ)_/¯

regal creek
#

Wait- before I start this joke, To claim a nitro gift do you need to be in that server?

stoic girder
#

hey hey hey who needs help

#

im in the mood

regal creek
#

I need answer

#

¯_(ツ)_/¯

stoic girder
#

nitro gift question?

#

no idea

#

not related to dev PB_yikes

regal creek
#

It will be, if I could get an answer.

#

Because

regal creek
#

Hm, imagine the dyno developers using dyno to claim nitro gifts

#

¯_(ツ)_/¯

cinder patio
#

I doubt they would be able to claim it faster than someone who is in the channel

regal creek
#

I guess.

eternal osprey
#

how can i get the weather

#

the weather boost

#

it should be in the link i sent

#

but i cannot access it for example

#

does anybody know how that variable is called based on that link

grizzled raven
#

okay so if you broadcastEval, will the shard that called it also do that eval

quartz kindle
#

yes

cerulean ingot
#

how do i make the bots page custom

rustic nova
#

Css and html

#

Use inspect element, that's the thing i suggest you to do

#

@cerulean ingot

cerulean ingot
#

@rustic nova i tried css #menu { position: absolute; top: 0; left: 0; right: 0; margin: auto; z-index: 999; background: rgb(254 174 53); }

#

and it didnt work

#

hmm

rustic nova
#

Use inspect element

cerulean ingot
#

i am

#

and i changed that in inspect

rustic nova
#

What are you trying to change?

cerulean ingot
#

the nav bar color

blissful axle
#

If you change it in inspect, it doesn't save.

cerulean ingot
#

yeah

#

exactly

rustic nova
#

You have to add the css in your long description

cerulean ingot
#

i did

rustic nova
#

With style tags

#

<style>

cerulean ingot
#

so

#

so do <#menu>?

#

<menu>

rustic nova
#

No

fiery quest
#

no, <style> css code ... </style>

cerulean ingot
#

ah

#

thank you guys

rustic nova
cerulean ingot
#

umm

#

it still didnt change

#

hmm

#

well

#

i dont know html

#

ohh i see

fiery quest
#
<style>
  #menu {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: auto;
    z-index: 999;
    background: rgb(254 174 53);
}
</style>
fiery quest
rustic nova
#

Then you're not ready to do edit your page

#

The <style> is html

cerulean ingot
#

oh no

#

i spelt style as sytle

fiery quest
cerulean ingot
#

i was typing too fast

#

sorry

glad violet
#

BRO

#

i got cannot read properly read of undefinded

#

in server.dispatcher.end()

rustic nova
#

Code?

glad violet
#

server.dispatcher.end();

rustic nova
#

Full code

glad violet
#

its up to 200 characters

#

sever.dispatcher.end() have problem

quartz kindle
#

we already told you what the problem is

#

server.dispatcher doesnt exist

glad violet
quartz kindle
#

yes

#

and it doesnt have a dispatcher

glad violet
#

dispatcher exists

#

this is end command

#

play command have dispatcher and works

#

bro something wrong with end

#

not with other commands

quartz kindle
#

the error literally says that dispatcher doesnt exist

glad violet
#

DISPATCHER EXISTS

#

i have this command adobe
server.dispatcher = connection.play(ytdl(server.queue[0], {filter: "audioonly"}));
and works great

#

end have problem

quartz kindle
#

dude...

#

read the error

glad violet
#

ok...

#

it dont say about dispatcher

quartz kindle
#

"cannot read property end of undefined"

#

which means

glad violet
#

when i type &stop bot crashes and says this error

quartz kindle
#

the code is doing undefined.end()

#

so it cannot read end of undefined

glad violet
#

Stop command code


              case 'stop':
                  var server = servers[message.guild.id];
                  if(message.guild.voice.connection){
                      for(var i = server.queue.length -1; i >=0; i--){
                          server.queue.splice(i, 1);
                 } 
                      server.dispatcher.end();
               message.channel.send("Leaving...")
                      console.log('Leaved Succes')

                 }
                 
                 if(message.guild.connection) message.guild.voice.connection.disconnect();
              break;
quartz kindle
#

already told you the problem is not there

#

do console.log(server.dispatcher)

#

and you'll see

glad violet
#

ok

#

where

quartz kindle
#

anywhere after you define server

#

and before trying to use end()

glad violet
#

ok

#

but can u fix this

#

what i must type to fix this

quartz kindle
#

the problem is not there

#

is not the stop command

glad violet
#

where it is

quartz kindle
#

somewhere in your code you deleted server.dispatcher

glad violet
#

ok

umbral geyser
#

hello, the standart is bot = discord.Client() right?

glad violet
#

i will send my code token hiden

umbral geyser
#

or is discord.Bot()

glad violet
#

open it with notepad

umbral geyser
#

ok thanks

#

just to make sure haha

glad violet
quartz kindle
#

its not my job to fix your code

glad violet
#

ok

#

but i have a problem

#

someone can fix it

#

plsss

#

what error it says

solemn leaf
#

@boreal iron

#

you still there?

#

Can I get help with this

glad violet
#

idk why

#

hey can anyone fix this error
server.dispatcher.end()
cannot read properly end of undefined

boreal iron
#

@solemn leaf sorry driving right now

#

Did u log the whitelist var?

solemn leaf
#

yes

#

{
users: [ '485987127809671168', '150647394344632320', '292946620759146496' ]
}

#

it printed that

boreal iron
#

lol

glad violet
#

try to add const evaled = eval(command)
First

quartz kindle
#

you're just making it worse lol

glad violet
#

.................

boreal iron
solemn leaf
#

index

quartz kindle
#

@glad violet do the same thing you did in your skip command

#

only end if dispatcher exists

glad violet
#

ok

boreal iron
#

Maybe Tim has an idea @solemn leaf

solemn leaf
#

erm

#

@boreal iron

#

whitelist in my export isthe embedconf

glad violet
#

ok

solemn leaf
#

how

glad violet
#

skip and stop code

              case 'skip':
                  var server = servers[message.guild.id];
                  if(server.dispatcher) server.dispatcher.end();
                  message.channel.send("Skipped!")
              break;
              
              case 'stop':
                  var server = servers[message.guild.id];
                  if(message.guild.voice.connection){
                      for(var i = server.queue.length -1; i >=0; i--){
                          server.queue.splice(i, 1);
                 } 
                      server.dispatcher.end();
               message.channel.send("Leaving...")
                      console.log('Leaved Succes')

                 }
                 
                 if(message.guild.connection) message.guild.voice.connection.disconnect();
              break;
boreal iron
#

Ah okay sorry didn’t remember it’s in there

solemn leaf
#

you tlaking to me?

#

I mean embedconf

boreal iron
#

Yeah

quartz kindle
#

@solemn leaf check your run function

solemn leaf
#

It printed embedconf

#

so whitelist isnt the whitelist json

#

this is what is sending it

#

if (commandfile) commandfile.run(bot, message, args, embedconf, whitelist);

boreal iron
#

Can’t take a look atm sry, driving rn

solemn leaf
#

@quartz kindle ?

#

tim?

sudden geyser
#

that's not secure

quartz kindle
#

the place where you use the function

sudden geyser
#

you're evaluating before checking.

quartz kindle
#

technicaly it is secure since hes evaling a fixed string lmao

sudden geyser
#

oh i am dumb

#

but why

quartz kindle
#

your variables are wrong

quartz kindle
#

you are evaling command

solemn leaf
#

yeah

#

?

boreal iron
#

You’re using 5 parameters instead of 4

solemn leaf
#

does it have to be the right size?

quartz kindle
#

@earnest phoenix if command is "eval" then if you eval(command) of course the result will be "eval"

boreal iron
#

Take a look at the message I responded to

solemn leaf
#

I fought I could cut the thigns I didnt need like bot and stuff

#

module.exports.run = async (bot, message, args, embedconf, whitelist) => {

boreal iron
#

Yeah

#

Now whitelist is argument 5 not 4

quartz kindle
#

@solemn leaf arguments are passed by order, not by name

solemn leaf
#

ah

#

thank

#

tim

glad violet
solemn leaf
#

when I do this

#

it makes it undenified

#

why

blissful raft
solemn leaf
blissful raft
#

Idk

boreal iron
solemn leaf
#

?

eager robin
solemn leaf
#

there is a space but it doesnt count it as another arg

glad violet
#

ok

quartz kindle
#

if you do toLowerCase() then it will never equal Hi because Hi has an uppercase

eager robin
#

oop

boreal iron
#

function test(p1, p2, p3)
{
p1...p2...p3...
}

Calling the function doesn’t require to use the argument names p1, p2 etc.

test(x, x, z)

#

Not so easy to explain while trying not to hit a tree lmao

solemn leaf
#

@boreal iron focus on road

#

talk later

#

okay

boreal iron
#

The args you passed x,y,z are not available inside your function as in my example

#

But p1, p2, p3 are

glad violet
#

bye going to sleep

boreal iron
#

If you call your function using less args for example, test(x,y)
will result in p3 is undefined

#

To complete the example and show you your issue

solemn leaf
#

no

#

How could I do like -announce #channel -T:Heyy -F:Heloo

#

t for title and f for feild

boreal iron
#

I would split by whitespaces at first and secondly split the items of the array by :
If this second array first item (key 0) is -T then check if the key 1 exists and boom you got your title

solemn leaf
#

so wait

#

change the args to be split by -

#

or soemthing

boreal iron
#

split by whitespaces first

solemn leaf
#

whitespaces?

boreal iron
#

spaces

#

" "

solemn leaf
#

" "

#

okay

#

so message.content.split

boreal iron
#

Or regex / +/g

solemn leaf
#

I dont know hwo to regex

#

so

#

wait

boreal iron
#

Then loop your array and split the items by :

#

If : wasn’t found as string in your item use continue; in your loop

solemn leaf
#

so let content = message.content.split(" ").slice(1);

boreal iron
#

Yeah to remove your command that makes sense

#

After loop content, search each element if a : was found inside its string

#

If so element.split(":")

solemn leaf
#

sow ait

#

wdym loop

#

like i

boreal iron
#

foreach, for etc. whatever u like more

#

content is an array

solemn leaf
#

idk how to do or which would be best

boreal iron
#

And you need to got through each element of it

#

for(let idx = 0; idx < content.length; idx++)

solemn leaf
#
    for (let idx = 0; idx < content.length; idx++) {

    }
boreal iron
#

Correct

solemn leaf
#
    let content = message.content.split(" ").slice(1);

    for (let idx = 0; idx < content.length; idx++) {
        content.split(":")
    }
boreal iron
#

if(!content[idx].includes(":")) continue;

#

First line in your loop

#

You can (again) split by : now

solemn leaf
#

again?

#
    for (let idx = 0; idx < content.length; idx++) {
        if(!content[idx].includes(":")) continue;
        content.split(":")
    }
boreal iron
#

You can split or search for -T:

#

And you got your value

solemn leaf
#

so wait

boreal iron
#

If you search tor the string you will have to remove -T: of course

solemn leaf
#

I want to check if the letter before the : is a t

#

or like anyother thing

boreal iron
#

*for the

#

Correct

#

If it’s T you got your title

#

Else if anything ... etc

safe creek
#

quick question whats the difference between an cog and a var?

solemn leaf
#

so

#

wait

boreal iron
#

Leaving highway now, that should be a good base

solemn leaf
#

content.split("title:")

#

that would work?

boreal iron
#

Ew would also work

solemn leaf
#

well I have to write out all the embed tags

#

either way

boreal iron
#

But is ineffective since you wanna pass more than one argument

#

As u said

solemn leaf
#

.match?

#

bcs I could do like

boreal iron
#

Just remind me tomorrow

solemn leaf
#

if (content.split("title:"))?

boreal iron
#

Will help you then

solemn leaf
#

ok

drifting wedge
#

How can I get the State of a checkbox in html using flask? Ping me with responses

hollow sedge
#

You can only get a list of the ones that are checked @drifting wedge

#

And their names

drifting wedge
#

Form.getlist

#

Alr once again lmao

#

Thanks

astral yoke
#

if i got bot.on('messageReactionAdd', async (reaction, user) => {} how would I get the message guild id?

earnest phoenix
#

look at the last three words of your question

#

you answered it yourself

astral yoke
#

that would just throw that it couldnt find the id but i figured out how

earnest phoenix
#

@drifting wedge

drifting wedge
#

yep

earnest phoenix
#

So

#

i want to learn mongo

#

from where can i start ?

drifting wedge
#

1 sec

#

this is where i started from

earnest phoenix
#

tnx

drifting wedge
#

gimme 1 sec

earnest phoenix
#

yes ofc

drifting wedge
earnest phoenix
#

tnx dude

drifting wedge
#

and youre set

#

audio / mic quality is shit

#

but you can look at code

#

to understand

#

ping me if u need any more help

earnest phoenix
#

YEah !

#

Thanks dude

#

can i add u as a friend ?

drifting wedge
#

umm just ping me or dm me

#

dms r open

pure lion
#

I can help too ya know

drifting wedge
#

nah frick dice

pure lion
#

I have a lot of general coding knowledge

earnest phoenix
#

YAS

drifting wedge
#

exe is very more pog

earnest phoenix
#

Python ?

pure lion
drifting wedge
#

im the "snake charmer"

pure lion
#

Yes py

drifting wedge
pure lion
#

I'm the everything charmer

drifting wedge
#

r/dice_isnt_pog

earnest phoenix
#

ok tnx guys

pure lion
#

Almost 7-8 langs bongo

earnest phoenix
#

i really apreciate it !

cerulean ingot
#

how do i get the user that voted on on_dbl_vote

pure lion
#

Muy pog

drifting wedge
#

really @pure lion

pure lion
#

Np

drifting wedge
#

list them

pure lion
#

Yes really

#

@cerulean ingot it should return it

drifting wedge
#

dice is nice

pure lion
#

••• FakE is typing...

jovial lava
#

••• **FakE **is typing...

earnest phoenix
#

Yeah i saw that 😂

jovial lava
#

A book of text is coming....any second now...

pure lion
#

Novel time

hollow sedge
#

watching videos isnt useful imo

#

you dont gain anything

#

it's mostly copying

boreal iron
#

let content = message.content.trim().split(" ").slice(1);
let title = null, announcement = null;

for(let i = 0; i < content.length; i++)
{
   if(!content[i].includes(":")) continue;

   let item = content[i].split(":");

   if(item[1] === undefined || item[2]) continue;

   let param = item[0].toLowerCase();

   if(param == "t") title = item[1];
   else if(param == "a") announcement = item[1];
}

if(title === null) return message.reply("no title given");
if(announcement === null) return message.reply("no announcement given");

Embed()
.setTitle(title)
.setDescription(announcement)
....

@solemn leaf

Possible typos... still driving
That should explain how to do it

hollow sedge
#

you wrote that..while driving?

boreal iron
#

Aye

hollow sedge
#

pro

boreal iron
#

Took a while

#

Need to look at the highway sometimes

hollow sedge
#

sometimes

#

not all the time lol

boreal iron
#

Aye

hollow sedge
#

the only typo i see is lenth instead of length

boreal iron
#

It’s not how I would code it but it should be understandable code

earnest phoenix
#

what's the difference between Java and JavaScript?

boreal iron
#

Oh

hollow sedge
#

i dont think they're similar at all

earnest phoenix
#

i just want to know what's the difference 🤔

hollow sedge
#

javascript is for stuff like websites

boreal iron
#

Fixed ty

hollow sedge
#

java is like C#

earnest phoenix
#

oh

hollow sedge
#

they really have nothing to do with each other

lament rock
#

Java is a compiled, Object Oriented, type safe language meant for the back end while JavaScript is a scripting language which can be used in both web dev and server development. JavaScript is also Object oriented but is not type safe. JavaScript is also interpreted instead of compiled

sudden geyser
#

they're both painful to write does that count /s

hollow sedge
#
It was all within six months from May till December (1995) that it was Mocha and then LiveScript. And then in early December, Netscape and Sun did a license agreement and it became JavaScript. And the idea was to make it a complementary scripting language to go with Java, with the compiled language.
earnest phoenix
#

hahahaha

#

but in c#

quartz kindle
#

as cry so eloquently said, java and javascript are like car and carpet

earnest phoenix
#

is this java?