#development

1 messages · Page 681 of 1

grave pilot
#

Just normal ping

earnest phoenix
#

library

grave pilot
#

Again, none

#

Just a ubuntu command

#

I know how to check it via a bot

earnest phoenix
#

just use the ping command?

grave pilot
tight heath
#

wdym with ping

#

like

#

just ping

#

but that's not how api ping works

earnest phoenix
#

pinging the gateway domain =/= getting the latency during the websocket connection

winter topaz
#

What do all the titles in the “bots library” mean?

onyx summit
#

titles?

slender thistle
#

That's wrappers for Discord API

#

libraries/modules to interact with Discord API through code

onyx summit
#

And there are different ones for different languages

winter topaz
#

Oh so- uh then if I’m making an English bot for a game on discord I would use?

onyx summit
#

Nope, I don't mean fucking English with languages

#

Language = Programming language

slender thistle
#

programming languages are meant by "languages"

earnest phoenix
#

they left

#

lol

onyx summit
#

Weakness disgusts me

#

jk, I would quite coding, but it's to late already

lusty dew
#

How would I save a time stamp after something is done?

#

Like if I’m making a daily cmd how would I save the time stamp after the money has been added

mossy vine
#

simply save the current unix timestamp in a database?

lusty dew
#

Not what I was asking.

#

I know how to save it

#

Just not after the money was added.

mossy vine
#

add the money and then save?

#

i dont understand lol

lusty dew
#

Hm. Okay.

hushed berry
#

😂

lusty dew
#

My setNick cmd doesn’t respond anymore.

#

It just stopped.

#

No errors either

earnest phoenix
#

how can i create an instant invitation with a bot

west raptor
#

create invites with a bot?

#

what library are you using

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

js

west raptor
#

d.js?

earnest phoenix
#

yes

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

west raptor
#

documentation is here: https://discord.js.org/

#

I'm on phone rn so I can't really remember off the top of my head

west spoke
#

anyways now that I'm finally fucking updating my api I'll consider going to rewrite..

#

Idk

brave anvil
#

Hey I need help making a bypass for my bot that will allow me to change the prefix of my bot in a server regardless of my perms

earnest phoenix
#

just check if the message author's id matches your id

#

if it does, skip permission checks

brave anvil
#

Ok but this

#

Ok

earnest phoenix
#

what that means is if the author's id matches myid return out of the method

brave anvil
#

...

#

One sec

#

Not all of it ofcourse

craggy notch
#

anyone here who can help me to create a bot for my server which can auto create a new voice channel whenever someone join the original vc please?

earnest phoenix
#

we can give you design tips

#

but not give you the code

coarse vapor
#

what library

craggy notch
#

reply me please

coarse vapor
#

reply: what library, i will give you the docs

mossy vine
#

i dont think they even know how to code

craggy notch
#

i am new and dont have any experience in this \

coarse vapor
#

pseudo code:
bot listener:
if a user has joined a voice channel:
create a new one

craggy notch
#

pls tell me from the starting

mossy vine
#

just use an existing bot

west raptor
#

Documentations for popular libraries

Javascript

discord.js: https://discord.js.org/#/docs/main/stable/
discord.js master: https://discord.js.org/#/docs/main/master/

Eris: https://abal.moe/Eris/docs

Python

discord.py: https://discordpy.readthedocs.io/en/latest/
discord.py async: https://discordpy.readthedocs.io/en/async/

Java

JDA: https://ci.dv8tion.net/job/JDA/javadoc/index.html

Discord4J: https://javadoc.jitpack.io/com/discord4j/discord4j/build/3.0.8/javadoc/index.html

.NET

Discord.Net stable: https://discord.foxbot.me/stable/
Discord.Net latest: https://discord.foxbot.me/latest/

DSharpPlus: https://dsharpplus.emzi0767.com
DSharpPlus Nightly: https://dsharpplus.github.io

Go

DiscordGo: https://godoc.org/github.com/bwmarrin/discordgo

Disgord: Not yet released according to github repo

Rust

Serenity: https://docs.rs/serenity/0.8.0/serenity/

If any of these are wrong or not updated to the current version of a library please DM or ping me. Also feel free to ping or DM me if you would like a library added to the list.

mossy vine
#

js ones arent links

#

@west raptor

craggy notch
#

@mossy vine cant even find this kind of bot if you know pls suggest

west raptor
#

fixed

cursive dagger
#

@craggy notch pay a bot dev to do it.

#

It's hard to find such specific bots

mossy vine
#

are you just gonna plug your fiverr now lmao

west raptor
#

I just spent like 20 minutes getting all of those and formatting them lmao

cursive dagger
#

@mossy vine nope. That would be advertising

earnest phoenix
#

how can i get a invite from a server with my bot

cursive dagger
#

Check d.js docs

earnest phoenix
#

I don't understand anything and I can't find anything

amber fractal
#

that's not allowed

#

unless you are given permission from the server owner

earnest phoenix
#

it's my server i'm doing a test

west raptor
amber fractal
#

doubt he's on master

west raptor
#

shit

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

I already saw it but I don't understand

amber fractal
#

Oh it's the same I believe

west raptor
#

ye

#

it is

sage bobcat
#

One message removed from a suspended account.

amber fractal
#

¯_(ツ)_/¯

#

you dont understand the docs?

west raptor
#

@earnest phoenix fetch the first channel the bot has access to and create an invite with that channel

sage bobcat
#

One message removed from a suspended account.

rugged bramble
#

how i check if is an username already being used?

earnest phoenix
#

ScorpionToday at 10:35 PM
how i check if is an username already being used?
can you elaborate

rugged bramble
#

im trying to make an rpg bot, then myself select a nickname example Bob if other person selects the name Bob return message You can't choose that nickname

#

@earnest phoenix

wide breach
#

@sob

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

get the guild members and filter them by nickname, then check if the filtered array is empty or if there are users with the nickname already @rugged bramble

earnest phoenix
#

im using canvas constructor i used .addRect() is there a way to make .addRect like png? so see through

#

like kinda see through the background instead of the block

#

like transparancy

quartz kindle
#

you mean transparent colors, or a rectangle with borders only?

earnest phoenix
#

rectangle

#

so i can see the background

#

so example i create a rectangle color grey and the background was pink . i can see through the grey ans see little bit of pink

#

and*

quartz kindle
#

you can use rgba colors

#

or hex with alpha

earnest phoenix
#

em

#

i use .setColor("")

#

for rectangle

quartz kindle
#
setColor("rgba(255,255,255,1)") // 0-255 red, 0-255 green, 0-255 blue, 0-1 opacity/transparency
setColor("#ffffffff") // 00-ff red, 00-ff green, 00-ff blue, 00-ff opacity/transparency
earnest phoenix
#

ill try

#

u cant see through it

#

its all white i cant see pink

quartz kindle
#

what did you use?

earnest phoenix
#

setColor("rgba(255,255,255,1)") // 0-255 red, 0-255 green, 0-255 blue, 0-1 opacity/transparency

quartz kindle
#

i didnt tell you to copy paste it

#

i showed you how it works, you have to set it yourself

#

the first three parameters are the color level, where 0 is nothing, and 255 is the max

tight forum
#
const db = require('quick.db');

exports.run = (client, message, args, func) => {
  
  let prefix = db.fetch(`prefix_${message.guild.id}`)
  
    if(args[0] === "sıfırla") {
    if(!prefix) {
      message.channel.send(`![kirmizitik](https://cdn.discordapp.com/emojis/608404381741613079.webp?size=128 "kirmizitik") | Sunucunuzda herhangi bir ayarlı prefix bulunmamakta.`)
      return
    }
    
    db.delete(`prefix_${message.guild.id}`)
    message.channel.send("![yesiltik](https://cdn.discordapp.com/emojis/608404352125632541.webp?size=128 "yesiltik") | Prefix başarıyla sıfırlandı. Mevcut prefix `.`")
    return
  }
  
  if (!args[0])
    return message.channel.send("![kirmizitik](https://cdn.discordapp.com/emojis/608404381741613079.webp?size=128 "kirmizitik") | Önce istediğin prefix'i belirtmelisin.\n" +"![yesiltik](https://cdn.discordapp.com/emojis/608404352125632541.webp?size=128 "yesiltik") | Doğru kullanım: `prefix <prefix>`")
  db.set(`prefix_${message.guild.id}`, args[0])
    message.channel.send(`![yesiltik](https://cdn.discordapp.com/emojis/608404352125632541.webp?size=128 "yesiltik") | Prefix başarıyla \`${args[0]}\` olarak ayarlandı, sıfırlamak istersen \`${args[0]}prefix sıfırla\` komutunu kullanabilirsin.`)
  
};

exports.conf = {
    enabled: true,
    guildOnly: true,
    aliases: [],
    permLevel: 3,
    kategori: "Prefix Komutu"
};
  
  exports.help = {
    name: 'prefix',
    description: 'Sunucunuza özel prefix ayarlar.',
    usage: 'prefix <prefix | sıfırla>'
};```
quartz kindle
#

first is red, second is green, third is blue

tight forum
#

where is wrong dude

quartz kindle
#

the 4th parameter is the opacity

#

it goes from 0 to 1

#

0 being totally transparent/invisible

#

1 being totaly opaque

#

if you want 50% transparency for example, set the 4th parameter to 0.5

#

@tight forum what is the problem?

soft cove
tight forum
#

cmd is working

#

but

#

its not change the prefix

quartz kindle
#

how do you check for prefixes? show your command handler

tight forum
#

so, do I have to do "module.exports.run"?

quartz kindle
#

show your command handler

tight forum
#

i have just prefix.js

quartz kindle
#

show the .on("message") part

tight forum
#

you mean this part ?

  db.set(`prefix_${message.guild.id}`, args[0])
    message.channel.send(`![yesiltik](https://cdn.discordapp.com/emojis/608404352125632541.webp?size=128 "yesiltik") | Prefix başarıyla \`${args[0]}\` olarak ayarlandı, sıfırlamak istersen \`${args[0]}prefix sıfırla\` komutunu kullanabilirsin.`)
quartz kindle
#

no, i mean your main file

#

bot.js or index.js or idk

#

also, i dont see any db.fetch on quick.db's website

#

they have db.set and db.get

tight forum
#

i think in my version, "db.fetch" is available

quartz kindle
#

ok, then show your main file

tight forum
#

my bot.js file does not contain anything with prefix but i can send the file if you want

quartz kindle
#

your bot.js contains the check for prefix.

#

for example, if message starts with prefix

twilit rapids
#

Maybe his message.js file (If they are using a command/event handler)

tight forum
#

i have only prefix.js file related to prefix

#

should i write something else to bot.js?

twilit rapids
#

Then where are you checking that a message is actually a command of your bot

tight forum
quartz kindle
#

you have a fixed prefix

#

loaded from the botconfig file

#

your bot always checks for this prefix, it never checks a prefix from quick.db

tight forum
#

oh.

#

then i have to remove ```js
const botconfig = require("./botconfig.json");

quartz kindle
#

no, you have to add a prefix from quick.db

#
bot.on("message", message => {

  if(message.author.bot) return;
  if(message.channel.type === "dm") return;

  let messageArray = message.content.split(" ");
  let cmd = messageArray[0];
  let args = messageArray.slice(1);

let prefix = db.get(`prefix_${message.guild.id}`);
if(!prefix) {
    prefix = botconfig.prefix;
}

// use prefix here instead of botconfig.prefix
});```
tight forum
#

for example, when writing an event in bot.js ```js
let prefix = require('quick.db').fetch(prefix_${message.guild.id})

do i have to write something like that?
#

oh you already wrote.

quartz kindle
#

yes

#

you can require quick.db on the beginning of the file

#

but you are correct

tight forum
#

tysm

#

for example, how do I define the ban command for prefix to work?

#

or do i need to make a definition?

quartz kindle
#

all your commands need to check the prefix from the db

#

iif prefix doesnt exist in db, then load prefix from config file

tight forum
#

really thank you so much, you are very patient

quartz kindle
#

👍

tight forum
#

uhm Tim are you there ?

#

i need a little help

#

Tim hung up

#

can someone help me?

warm marsh
#

Is there a program for easy editing a sqlite file?

tight forum
#

sqlite browser ? MegaThonk

#

idk

#

try it

warm marsh
#

Ok

tight forum
#

guys the codes Tim gave me were fine. but now my commands don't work as if there were no prefixes

sinful lotus
#

then add a default one if there is no prefix

#

use javascript ||

wheat moon
#

I'm a bot developer, can i get a role as for that?

#

well im just a developer in general

sinful lotus
#

submit a bot

#

get it verified then you get the role

wheat moon
#

Alright

earnest phoenix
#

@tight forum

let p = new db.table("PREFIXES)
let prefix = p.fetch(`${message.guild.id`)

if(!prefix || prefix === null || prefix === undefined){
p.set(`${message.guild.id}`,  '<prefix>')
prefix = <prefix>;```
#

Sorry if anything is incorrect as I did that on a crappy phone

topaz fjord
#

you only need the first one

sinful lotus
earnest phoenix
#

Eh

#

Well

sinful lotus
#

saves db space as well

#

sqlite gets slower as more data is stuffed in it

earnest phoenix
#

Yeah

outer niche
#

inport discord from discord.ext.commands import commands,has_permissions, MissingPermissions import json with open('reports.json', encoding='utf-8') as f: try: report = json.load(f) except ValueError: report = {} report['users'] = [] client = discord.ext.commands.Bot(command_prefix = '?') @client.command(pass_context = True) @has_permissions(manage_roles=True, ban_members=True) async def warn(ctx,user:discord.User,*reason:str): if not reason: await client.say("Please provide a reason") return reason = ' '.join(reason) for current_user in report['users']: if current_user['name'] == user.name: current_user['reasons'].append(reason) break else: report['users'].append({ 'name':user.name, 'reasons': [reason,] }) with open('reports.json','w+') as f: json.dump(report,f) @client.command(pass_context = True) async def warnings(ctx,user:discord.User): for current_user in report['users']: if user.name == current_user['name']: await client.say(f"{user.name} has been reported {len(current_user['reasons'])} times : {','.join(current_user['reasons'])}") break else: await client.say(f"{user.name} has never been reported") @warn.error async def kick_error(error, ctx): if isinstance(error, MissingPermissions): text = "Sorry {}, you do not have permissions to do that!".format(ctx.message.author) await client.send_message(ctx.message.channel, text) client.run("BOT_TOKEN")

#

Does something like this even work anymore

west spoke
#

why the FUCK is that one line

lament meteor
#

i meant i could work but it hurts my eyes

quasi forge
#

D.js commando
I want to make sure that some commands are only run if some certain conditions are met (not permissions). I tried adding an inhibitor for the purpose but it didn't run for any of the commands or even any message in general. Is there some other way to make sure that the command is only run if the condition is met other than putting the condition in the command's run method as I need to do the same for multiple commands.

opaque eagle
#

What’s the specific condition

earnest phoenix
#

we need more information (Code "without token" , screenshot of the error in the console)

quasi forge
#

@opaque eagle the condition is if the channel where the command is used is in a specific channel whose id is there in the array that I've stored in my database

opaque eagle
#

I’d just suggest extending the Command class

earnest phoenix
opaque eagle
#

Show where you defined message

quasi forge
#

@opaque eagle how do you suggest I do it by extending the command class?

#

That's how I'm defining my commands for now

#

Do you suggest I define another abstract class where I perform the test before running the command

opaque eagle
#

Yeah

quasi forge
#

And use my class to create the commands?

#

But I want similar conditions to be applicable for the normal messages as well

stray garnet
#

what is that event called for edited messages?

earnest phoenix
#

Client#messageUpdate

#

@stray garnet

stray garnet
#

kk

earnest phoenix
#

Work with oldMessage, newMessage

stray garnet
#

Thanks

#

^^

earnest phoenix
#

console.log(`${oldMessage} - ${newMessage}`) 

}}```
#

Like that

stray garnet
#

Ok

tall arrow
#

Any way to make the bot send a message to a random channel in the guildCreate event?

tight forum
#

@earnest phoenix i will try it, ty

cursive dagger
#

@tall arrow read the docs for your lib

mental thorn
#

Does anyone know what CSS I need to define to change the appearance of the report, vote, and join support server buttons?

restive night
#

anyone know how to get a user id who reacts inside collect event after that user reacts?

j.on('collect', (r) => { 

})
tight heath
#

are you using the d.js ReactionCollector?

#

@restive night ^ also what version? 11.5 or 12

restive night
#

already solved, thanks for response btw

mossy vine
#

jfc

#

read the docs

#

what the hell are you even diong

earnest phoenix
#

I use the v12 d.js but this does not work but I do not know why:

        message.guild.channels.forEach (async (channel, id) => {
          channel.overwritePermissions ({
            permissionOverwrites: [
              {
                  id: tmute.id,
                  deny: ["SEND_MESSAGES"],
              }
            ]
              reason: 'Mute.'
            });
      }); ```

Knowing that it puts me no mistake in the console
tight heath
#

@earnest phoenix well uh doesn't overwritePermissions delete all other perms

#

you might wanna use this

earnest phoenix
#

ok

stray garnet
#

Could not find node null, using 10

what does that mean

earnest phoenix
#

Why i have this error : `

(node:14) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'delete' of undefined
at message.guild.channels.forEach (/home/container/commands/admin/unmute.js:11:58)
at Map.forEach (<anonymous>)
at Object.module.exports.run (/home/container/commands/admin/unmute.js:10:26)
at Client.client.on.message (/home/container/theking.js:225:33)
at Client.emit (events.js:203:15)
at MessageCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:391:31)
at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:418:22)
at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:274:10)```

Code : ```js
        message.guild.channels.forEach(async (channel, id) => {
            await channel.permissionOverwrites.get(utilisateur.id).delete()
        });```
pseudo parcel
#

anyone could help me to get my bot accepted.

#

tell me rejecting things. plz

opaque eagle
#

How is utilisateur defined? @earnest phoenix

#

Why was you bot rejected? @pseudo parcel

pseudo parcel
#

reboot command was have administrator perm level

#

3

#

now 4

#

so only me

opaque eagle
#

Reboot command must be restricted to you and you only

pseudo parcel
#

ok

opaque eagle
#

How annoying would it be if user x in a server can’t use your bot because the owner of server y chose to reboot your bot

earnest phoenix
#
const { MessageEmbed } = require ("discord.js");

module.exports.run = async (client, message, args) => {
    if(!message.guild.me.hasPermission("MANAGE_MESSAGES")) return ("**:x: Je n'ai pas la permission de unmute des membres !**")
    if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.channel.send("**:x: Vous n'avez pas la permission d'effectuer cette commande.**");
    let utilisateur = message.guild.member(message.mentions.users.first()) || message.guild.members.get(args[0]);
    if(!utilisateur) return message.channel.send("**:x: Veuillez mentionner un utilisateur.**");
    
    try {
        message.guild.channels.forEach((channel, id) => {
            await channel.permissionOverwrites.get(utilisateur.id).delete()
        });
    } catch(e){
        message.channel.send("**:x: Je n'ai pas la permission de gérer les permissions.**")
    }
    message.channel.send(`**:white_check_mark: L'utilisateur ${utilisateur} à été unmute avec succès.**`)
        utilisateur.send(`**:tada: Vous avez été unmute dans le serveur ${message.guild.name}**`).catch(err => {
            if(err) {
                console.log("Impossible de DM")
                } 
            }) 
            let logs = message.guild.channels.find(c => c.name == "theking-logs")
            if(!logs) {
              console.log("pas le salon logs")
            }
  var logse = new MessageEmbed() 
  .setColor(`#7CFC00`)
  .setTitle("[UNMUTE] Utilisateur unmute !")
  .addField("Modérateur :", `${message.author}`)
  .addField("Utilisateur unmute :", `${utilisateur} avec l'identifiant ${utilisateur.id}`)
  try{
      logs.send(logse) 
  } catch(e) {
    console.log("Impossible de send")
}
}
    
module.exports.help = {
    name:"unmute"
} ```@opaque eagle
#

beacause is a loop

#

no?

opaque eagle
#

Maybe they have no overwrites?

earnest phoenix
#

All channels have overwrite but it's looped twice

#

@opaque eagle

opaque eagle
#

You’re making an unmute command?

earnest phoenix
#

yes

#

with d.js v12

opaque eagle
#

Discord bots generally mute users by adding and removing a “Muted” role, not by manually changing permission levels for each channel

#

Your implementation is very spammy and Discord API abuse-y.

earnest phoenix
#

Yes, but on some servers it does not work

#

beacause perms so bad

opaque eagle
#

I don’t approve of API abuse, maybe someone else can help you with that.

earnest phoenix
#

Could you tell me how to do it every 7 seconds?@opaque eagle

grave pilot
#

@earnest phoenix simply make a timer

earnest phoenix
#

ok

stray garnet
#

Could not find node null, using 10

what does that mean

opaque eagle
earnest phoenix
#

moderators please test my bot

opaque eagle
#

They will test when they have the time

earnest phoenix
#

592630332201893889

opaque eagle
#

Wait for a week upon submission before complaining

wet void
#

@stray garnet you are hosting on Glitch right, that's why you see that

earnest phoenix
#

other bots are being approved

#

mines staked up

#

please look forward

tight heath
#

wrong channel

#

and pls dont annoy everyone because your one of 20000 bots isn't approved yet

earnest phoenix
#

-bots @tight heath

gilded plankBOT
#
Bots <:dblCertified:392249976639455232>

@versed thorndblCertified

tight heath
#

@earnest phoenix using a user instead of a role doesn't change a thing really

#

with misconfigured perms

#

you're better off just creating a role on first use of mute

earnest phoenix
#

wt hell

tight heath
#

and saving the id of that

earnest phoenix
#

@versed thorn

tight heath
#

and on each consecutive mute you just assign the role

earnest phoenix
#

oh

tight heath
#

macc pls this is development

earnest phoenix
#

sorry,Sir

wet void
tight heath
stray garnet
#

@wet void so what does that mean

tight heath
#

that means

#

that you don't need to worry at all

#

it's just telling you, that you didn't tell it which version of node.js to use

#

so it automatically uses the latest stable version, being 10.

wet void
#

Read the post man .-.

tight heath
#

people in here aren't the brightest candles cloud-chan

#

you'll notice soon enough

grave pilot
#

-bots @grave pilot

gilded plankBOT
tight heath
grave pilot
#

Whops

#

Soz

tight heath
#

dw

stray garnet
#
const Embed = new Discord.RichEmbed()
.setAuthor("Edited Message")
.setDescription(`Original Message:\n${oldMessage}\n\nNew Message:\n${newMessage}`)

let edit = JSON.parse(fs.readFileSync("./logss.json", "utf8"));
    if(!edit[message.guild.id]){
      return message.channel.send(`
An Server Admin must set the Log Channel with !setlogs <ChannelName>.
      `)
    }
    let log = edit[message.guild.id].log
    let logc = message.guild.channels.find(r => r.name === log);
    if(!log) return message.channel.send(`
Error 404!
`)
    message.delete();
    logc.send(Embed);
    })```

Why it dont sends it when i edit an Message? And yes #log does exist
mossy vine
#

you cant just do oldMessage, newMessage, message to recieve a message object as well lmao

outer niche
#

Ok

#

-bots @outer niche

gilded plankBOT
stray garnet
#

@mossy vine so?

earnest phoenix
#

unless you are emitting it yourself and passing that 3rd param. it doesn't exist

mossy vine
#

tf you mean so

#

do you understand how an EventEmitter works

earnest phoenix
outer niche
#

Why? @earnest phoenix

earnest phoenix
#

For bots command

outer niche
#

Ooo ok

tight heath
smoky brook
#

.

mossy vine
#

that can potentially abuse the api

#

¯_(ツ)_/¯

earnest phoenix
#

it's very specific, i doubt such bot exists

quartz kindle
#

why does it need to be a separate message for each line?

quick kayak
#

@quartz kindle Just for the effect

quartz kindle
#

the problem is that is terribly innefficient for both discord and for your bot

#

sending a poem line by line will take more time and much more resources, because you need to respect rate limits

#

ie: you cant send more than 5 messages every 5 seconds

#

for starters

#

and repeatedly sending as much messages as possible for a long period of time might lead to account ban

unique nimbus
#

I mean you could get a poem api and make it write to a txt then send to a person every hour or some shit

quick kayak
#

Oh okay

quartz kindle
#

its plausible if you make it wait a second or two before sending the next line

#

but even so, you'd have to make the bot yourself, as it probably doesnt exist

quick kayak
#

@quartz kindle That's how I intended it like that, sending a message like every few seconds. Just as much as it would take to read a line out loud which would be about 5 seconds

quartz kindle
#

i guess that would be ok

#

but im pretty sure a bot like that doesnt exist

earnest phoenix
#

you'll have to make it yourself or hire someone to do it for you

#

or you might come across a person who's willing to do it for free

quick kayak
#

Okay then I guess I'm gonna read in the API

#

and try to tinker something myself. Thanks four your help 👍

quartz kindle
#

good luck 👍

rare shore
#

hello guys, one of my friends on another discord suggested, so I joined this one.
I am looking for getting a bot made for one of games that I play.
Would anyone be able to help?

#

I am willing to pay

merry ore
#

also the code is from dbl api link

#

it worked fine before GWbruhGalaxyThink

slender thistle
#

Alright looks like nobody reads changelog

#

It's dbl.DBLClient now

merry ore
#

ok

#

works ok thx

earnest phoenix
#

which bot should i use for moderation in my support server

opaque eagle
#

We’re not a bot curation server

#

There’s a search function on our website, use it

earnest phoenix
#

well...

#

ok

loud salmon
#

dbl hardrequest @quick kayak

covert turtleBOT
#

You seem to have asked for a very specific bot/feature. You likely won't find it on the site if you haven't searched already... What you can do is talk to Oliy#0330 to get access to #434058442764714002 and find a developer willing to do the job. Be sure you provide enough details like payment options, if you are going to selfhost it or not, how fast you want it done, etc.

opaque eagle
#

Not freelance work like what they’re asking for

loud salmon
#

@opaque eagle nah, its just that none of the people requesting bots are formal enough or pressure oliy enough

quartz kindle
#

and most of them not willing to pay

opaque eagle
#

LOL

earnest phoenix
#

I just wanted to ask if people use bots such as Dyno or Mee6 for moderation or do they make their own :/

unique nimbus
#

I mean some people uses their own

rocky seal
#

I make my own lol

fallen prism
#

I made my own. For the basics you only need a few lines of code.

earnest phoenix
#

I guess i can make a specific one for my use

fallen prism
#

Along the lines of if(message.body.contains(“https://”)){ message.delete } not exact code but an example

earnest phoenix
#

Hmm noice

#

Thanks

fallen prism
#

I usually add a group check condition to it as well. Like && message.member.roles.some(r => [“Administrator”].includes(r.name))

#

That way you can exclude some roles from using urls/discord invites.

earnest phoenix
#

Hmmm

inner jewel
#

[“Administrator”].includes(r.name) can be just r.name === "Administrator"

fallen prism
#

Really? 🤔 I guess so, never thought of it that way.

#

That would get messy with more then one role though. Have to have multiple conditions, right?

earnest phoenix
#

You can use switch statements :/

fallen prism
#

That is true, or amend the original code, [“Administrator”,”Moderator”]

quartz kindle
#

or check if member has admin/mod permissions, instead of going through their roles

inner jewel
#

a switch statement would be the worst option there

#

you'd go from js roles.some(r => ["a", "b"].includes(r.name));tojs roles.some(r => { switch(r.name) { case "a": case "b": return true; default: return false; } });

earnest phoenix
#

module.exports.run = async (client, message, args) => {
    let msg = await message.channel.send("**✅ Génération...**");

    let mentionedUser = message.mentions.users.first() || message.author;

        let avatarembed = new MessageEmbed()

        .setImage(mentionedUser.displayAvatarURL())
        .setColor("#FFFFFF")
        .setTitle(`Avatar de ${mentionedUser.username}`)
        .setFooter("Demandé par " + message.author.tag)
        .setDescription("[Cliquez ici si l'image ne s'affiche pas.]("+mentionedUser.displayAvatarURL+")");

        message.channel.send(avatarembed)

		

    msg.delete();
}

module.exports.help = {
    name: "avatar"
}```
#

Why do I see her above the picture?

#

I use d.js v12

#

because it's a method not a property

abstract crow
#

Would anyone happen to know why in Express.JS when I include a partial the CSS doesn't come along? It only happens in this one file, every other ejs file I include a partial in it works, just not this one. <%- include partial/navbar.ejs %>

quartz kindle
#

try <% instead of <%-

brave anvil
#

I need help making a music bot and what would be the requirements

#

Like Dependencies

lusty dew
#

How can I get random responses from an array of strings?

#

I tried:

const responses = [’array of strings']
const reps = Math.floor(Math.random() * responses.length)
#

Or would I have to do

#
const responses = [’array of strings']
const reps = responses[Math.floor(Math.random() * responses.length)]
brave anvil
#

What I did for mine Like are you trying to make an 8ball command for something?

lusty dew
#

No work command with random responses

brave anvil
#

Oh

#

Well I would do

lusty dew
#

I got it

brave anvil
#

Example const work =[“Jobs”, “....”, “.....”];
const work = math.floor(math.random() * work.length);

lusty dew
#

That wouldn’t work

brave anvil
#

...

#

And whys that?

lusty dew
#

Because it returns a number iirc

brave anvil
#

Well I’m not finished with it

lusty dew
#

It returned a number for me at least

#

You’d have to do

onyx summit
#
  1. 2 variables with the same name
  2. you probably meant work[ math.floor(math.random() * work.length)]
brave anvil
#

Oh yeha

#

...

#

Cause the definition has already been declared

lusty dew
#
const array = [’array of strings’]
const random = array[Math.floor(Math.random() * array.length))]
brave anvil
#

And you cant duplicate declare XD

#

I’m new

#

Sorry

lusty dew
#

You could but it’d cause problems and possibly errors

brave anvil
#

Yeha

lusty dew
#

Especially when using const

#

Since you can’t give a variable a new value when using const

brave anvil
#

How would I do a setstatus command for only me?

#

For a djs bot?

lusty dew
#

Check if it’s your ID

#

Like

brave anvil
#

No like

#

(prefix)setstatus online, idle, dnd, invisible

lusty dew
#
If(message.author.id !== ”yourID”){
//error message
}else{
//code here
}
brave anvil
#

But what if not return

lusty dew
#

Wdym?

lusty dew
#

^

#

One of the things you will need

brave anvil
#

Not activity

#

Status the bubble

#

Or Dot

lusty dew
#

But just check if the person using the command ID matches yours.

brave anvil
#

Ok

lusty dew
#

If it doesn’t send an error message, if it does proceed with the command

#

Then use setPresence

lusty dew
#

And just the status option

#

I don’t think you can make a bot appear offline can ya?

#

I tried it and it just remains online so idk

brave anvil
#

Yes

onyx summit
#

you can, but I think if you switch to offline, your bot won't read messages, but I'm not sure

brave anvil
#

Hmm

onyx summit
#

just try it

brave anvil
#

Cause my bot @unborn mulch is on dnd

lusty dew
#

Well let’s test it

#

How do I do it

brave anvil
#

But its in his code

lusty dew
#

Cause last time I tried it didn’t work

#

I’m guessing just

brave anvil
#

(bot)client.user.setactivity(

lusty dew
#

client.user.setPresence({status: 'offline’})

brave anvil
#

...

lusty dew
#

What?

brave anvil
#

i use client.user.setstatus(‘dnd’);

onyx summit
#

cool

#

both work

brave anvil
#

Yeah

#

But I log things

onyx summit
brave anvil
#

Commands Mainly Not the args

#

Oh and errors yayyyy!!

lusty dew
#

Wait I did that wrong I think

#

Oh wait no nvm

#

Reading the docs wrong kek

#

Yea didn’t work

#

@onyx summit

#

Kek

brave anvil
#

How would I make a

#

Music bot

#

Dependencies

onyx summit
#

tell Discord not me

lusty dew
#

By coding it

onyx summit
lusty dew
#

cough I suggest Lavalink but ytdl-core is good for beginners

earnest phoenix
#

lavalink is trash

#

good set of features but badly optimized

onyx summit
#

yes, I see its ram usage growing everyday Angery

#

but its not really much, so idc

abstract crow
#

from /dashboard you have /servers

#

Usually they just have pages or views and then /index.ejs, dashboard.ejs, etc. But then for stuff like ^ above, I would have to do /dashboard-servers.ejs and egh

earnest phoenix
#

I need help! My bot lost its ability to display a custom status(DND in my case) and activity

#

@earnest phoenix u using activity or game?

#

@earnest phoenix It's fixed now 😕

#

okey

west spoke
#

ok this is probs a dumb mistake of mine, but how would I upload a .png to a github repo using pygithub

#

I tried uploading a blank file then editing it, but that, well didn't end well.

#

And if I try uploading the image file, it will give that. It doesnt allow a sha to be supplied.

mild escarp
#

can someone tell me how to make the kick command

earnest phoenix
#

in which library

mild escarp
#

im a bit new on bots

#

discord.js

earnest phoenix
fallen prism
#

Before you try to kick someone, make sure they are kickable

shadow copper
#

how do you set a bot to watching?

#

useing discord.js

fallen prism
#

On that page there is an example of how to set the bots status.

shadow copper
#

thank you

mild escarp
#

can someone tell me how to make a bot send an image without a link of an image?

unique nimbus
#

you could put it in an embed

#

.setImage(url=)

#

I think thats how js is

mild escarp
#

oh okay

sick cloud
#

rm: cannot remove 'node_modules/': Is a directory
what

fallen prism
#

have to use <code>rm -rf</code

quartz kindle
#

you need to specifically set the r flag (recursive)

sick cloud
#

well it doesn't error but the folder stays

fallen prism
#

Do ‘’’ ls -l ‘’’

#

Ugh. I’ll never learn markup. Lol

#

ls -l

#

See if you own it or even have Perms to delete it.

sick cloud
#

oh ok i just had to refresh to show changes

lusty dew
#

How can I make a fail rate? Like they have a 25% chance to fail or succeed

earnest phoenix
#

follow percentage logic

#

generate a random value between 0 and 100, you'll get your rate and then you can decide which value is fail or success, eg if the value is 25 or under (25%), return a fail

lusty dew
#

So basically make use of Math.random?

earnest phoenix
#

i have no idea what that is, but it sounds like the right thing, so yes

lusty dew
#

Okay

#

Thanks

#

I was just thinking about that but I wasn’t sure how it’d help

#

Thanks for pointing it out :)

tepid summit
#

c!howgau

#

c!help

#

Aaaahhhh

idle mountain
#

this channel is for help with development

tight mountain
#

okay so im making a discord.js bot and i am trying to make a footer for my help command that says the user and the time (ex: the wire#2204•Today at 8:53 PM)

#

but when i try to do it it just puts my user id

#

<@209410953035513856>•Today at 8:53 PM

hollow saddle
#

Get the tag from the user object

#

message.author.tag

tight mountain
#

Thanks

valid frigate
#

what's the most reliable way to generate a random number in c++

#

i legit looked on so and cant find any solid answer

brave anvil
#

Whatz a good vps hosting?

#

Company

lusty dew
#

There a lot of em

#

AWS, DG, heroku

hushed berry
#

Im a big fan of DigitalOcean

valid frigate
#

heroku doesnt count

#

and do is pretty good

#

if you get someones referral code you get like 10 months free lmao

maiden mauve
#

Why so much heroku hate on here

#

I've had 100% uptime for $0

#

For 3 months

earnest phoenix
#

probably because you've got low usage

maiden mauve
#

Yeah, definitely small end

#

50 users or so

earnest phoenix
#

then it doesn't count

maiden mauve
#

Sobheroku goes downhill fast with data then?

earnest phoenix
#

yes

#

it doesn't perform well during concurrency

#

nor like

#

more than 10 commands in 30 seconds

hushed berry
#

its not really meant for bots at all

earnest phoenix
#

that too

maiden mauve
#

Hm

earnest phoenix
#

heroku's meant for web hosting

hushed berry
#

sure, you can fit a square peg into a round hole if the square peg is small enough

maiden mauve
#

I just found it to be super easy with nodejs

hushed berry
#

but you'll run into issues sooner or later

sinful lotus
#

just host it on an actual server

#

not only you will have less problems

#

you will also learn linux as you go helping you in future incase your bot grows

#
  • you can host a lot of other side apps that you can experiment with
#

You can also have it as your personal vpn if you like / need those

maiden mauve
#

Eww learning

sinful lotus
#

you are not fit to be a developer if you dont want to learn GWahreeVampySmug

maiden mauve
#

Lol I'm about to take in a year's worth of job learning

#

I'm just scared of extra projects for the momebt

#

I totally agree though

#

Learning separates those who should from those who cant

sinful lotus
#

I have side jobs since Im not yet in college and I maintain my bot on top of that while learning more about things

earnest phoenix
#

why not aquire such knowledge now and accelerate in it later rather than learn it later and not stand out

maiden mauve
#

I was going down the path of career programming 2hen I found a dream job

sinful lotus
#

or just dont be a developer if you dont like reading, effort and patience

maiden mauve
#

Now it's a hobby

#

I love creating things but ive lost my flame for reaching out and learning it

#

ATC keeps you pretty busy learning shit blobsipfast

#

Honestly every programming avenue (learning a system) is the career

#

It becomes second nature

earnest phoenix
#

most likely

#

i do understand people lose passion for coding, it just means it's not at their best of interests

maiden mauve
#

There is no such thing as a career programmer that knows 1 language in 1 compiler for 1 application

#

Actually maybe with a good contract...

#

I love coding but the coders basic tasks are sometimes difficult

#

Professionals would call it basica of the job

#

Git code for example

earnest phoenix
#

don't get me wrong here, the field of programming jobs is oversaturated (e.g software eng.), but it's oversaturated with underqualified people who have most likely lied on their resume or are being screwed around by the parent company

#

which if you have enough experience in that field, you already stand out

maiden mauve
#

Yeah that's the scary part

#

Cs majors that should have been janitors

#

People with no initiative to learn and be creative

earnest phoenix
#

this tbh

maiden mauve
#

You see it all over the web

#

Long maintenance, terrible input checks

#

Visual basic forms

#

I haven't been able to view my work schedule for 2 weeks

#

Because the federal contract is a traveling circus

brave anvil
#

How would I make a command for my bot that will clear all of his past responses

earnest phoenix
#

all of them?

brave anvil
#

Yes

#

Like dyno

earnest phoenix
#

dyno doesn't clear all

#

it clears recents

brave anvil
#

Yes

#

Exaclty

#

Soo...

earnest phoenix
#

there's not really a way without api abuse

brave anvil
#

Damn

slender thistle
#

Is ytdl decent for beginning

brave anvil
#

Uhh

earnest phoenix
#

you'd have to keep spamming the endpoint until you got all of the messages in the channel then filter out your bot's messages and then delete all of those

brave anvil
#

Oh

#

Thats abuse

earnest phoenix
#

but that could take hours on end and you can get banned from the api

#

yeah

slender thistle
#

And that's just one channel

brave anvil
#

Then how does

#

Nvm

#

Is there an eval

slender thistle
#

Save bot's messages in cache? chadthonk

brave anvil
#

How?

earnest phoenix
#

not reliable enough

slender thistle
#

True

earnest phoenix
#

if the process has been restarted the cache is lost

brave anvil
#

And its storage consuming

#

Sooo

earnest phoenix
#

an efficient but rather unproductive way would be to ban the bot then unban it and invite it back in

#

nevermind, even that has a limit

#

maximum of 7 days history deletion

brave anvil
#

Hmmm

#

Is there evaluation command?

#

I have mainframe that will delete the last message sent by my bot but its only the last message

tight mountain
#

is client.ping the API ping?

devout chasm
#

if d.js then ws

earnest phoenix
#

@tight mountain no

#

client.ping/s are just the ping of the bot

devout chasm
#

Erm

tight forum
#

guyz

#

hellow

#

I still haven't fixed my prefix, can you help me?

#

commands don't work as if there were no prefixes

#

where is wrong ?

quartz kindle
#

you're not running any command

tight forum
#

oh tim

#

hi again

quartz kindle
#
let prefix = getyourprefixhere;
// check for prefix+command and run command here```
tight forum
#

I didn't want to bother you any more

#

do i have to write this in bot.js?

#

or prefix.js

quartz kindle
#

in bot.js

quartz kindle
#

What is the problem?

#

Dms dont have permissions, so permlevel doesnt work

#

A reboot command should be locked for owber only

#

Do you have a pernission level for owner?

#

Yes, but did you make one for you?

#

You can make a permlevel that checks that

#

Where do you check for permlevels?

#

You copied the code from someone else?

#

Same as copying

#

Anyway, i already told you how to check for owner, now you have to figure it out

#

Then try it

#

Make it 5 and ask someone to try reboot it

tight forum
#

wut ooo

#

so cool

quartz kindle
#

then you need to check how the permlevel checking works

#

find the file where the checks are done

#

or simply just make your own owner check

earnest phoenix
#

I cant put background on my bot page html's.

tight forum
#

colour or pic ?

earnest phoenix
#

picture

quartz kindle
#

what did you try?

earnest phoenix
#

body {
background-image: url('link')
}

copper cradle
#

hmm

tight forum
#

do you have a css file ?

earnest phoenix
#

no

tight forum
#

or did you write it in html?

#

oh ok

earnest phoenix
#

ready code

quartz kindle
#

it does work for me

tight forum
#

uhm hiname

#

@earnest phoenix

#

for speakin' turkish

earnest phoenix
#

okey.

quartz kindle
#

which version of discord.js are you on?

#

defaultChannel is deprecated in stable and removed in master

grim aspen
#

Depending on which version you are on, send isn’t really a function or what Tim said

quartz kindle
#

defaultChannel still exists in 11.4.2 but it should not be used, because it refers to the general channel of a guild, and that channel can be removed

#

if a guild deletes its general channel, defaultChannel will not work

grim aspen
#

wouldn't it be .channel then?

quartz kindle
#

no

#

if you want to send a message when a user joins, you have to configure a specific channel based on what the guild wants

#

so you need to setup a database to save configuration and the guild owners need to set which channel they want to receive those messages on

grim aspen
#

restricting it by owner id

mossy vine
#

then your permission system isnt working

earnest phoenix
#

you can use Channels#random

#

If you want a default channel

mossy vine
#

oml

#

just make a fucking alt account

earnest phoenix
#

Try with a proxy

#

And a vpn

#

Or change your mac adress

quartz kindle
#

how about just debugging and logging your code?

#

easier to test than making alt accounts

bright meadow
#

7 24

earnest phoenix
#

On the guildbanadd event how do I retrieve who banned that user to post a message in a certain room?

quartz kindle
#

you need audit log permissions and retrieve it from there

tight forum
#

Hey tim!

#

I made some changes with help

#

has this error ```js
Uncaught Promise Error:
TypeError: Cannot read property 'length' of undefined

opaque eagle
#

What's the command you entered to get that errorr

#

Like what did u send in Discord

tight forum
#

ld.prefix

#

but there is one more problem, now no commands are working

#

not just prefix cmd

opaque eagle
#

Instead of writing all that extra code, why not just do: js const prefix = await bot.prefixes.get(message.guild.id) || botconfig.prefix;

#

Just use the or operator lmao

tight forum
#

I tried, but will that solve my problem?

opaque eagle
#

If you tried it, you'd know if it solves your problem or not.

#

That's just a style thing, since a lot of your code there is redundant... the real problem I think is that botconfig.prefix is undefined.

tight forum
#

this time i got this

#
Uncaught Promise Error:
TypeError: Assignment to constant variable.
#

@opaque eagle

opaque eagle
#

Remove those other lines you had

#

What I sent was supposed to replace all thisjs let prefix = botconfig.prefix; const data = await bot.prefixes.get(message.guild.id); if (data === null) { prefix = botconfig.prefix; } else { prefix = data; }

tight forum
#

with data ?

#

im using endb Does the problem occur?

opaque eagle
#

Even if there's a problem with the db, the var falls back to botconfig.prefix

#

The problem is likely that botconfig.prefix is undefined

#

Not really how I have my perm levels set up but tbh the most foolproof solution I can give you is writing the check in the command itself... when the reboot command is run, js if (message.author.id === "YOUR ID") return;

#

In your command

#

Yes

#

Right after js exports.run = (client, message, args) => {

tight forum
#

SinistireCyborg

#

the event is ok

#

now

#

but

opaque eagle
#

Yes that should work fine.

tight forum
#

its not changing prefix

#

check it what is that ?

opaque eagle
#

To check what the prefix is?

#

console.log()?

tight forum
#

w8

#
TypeError: client.prefixes is not a function
#

with this code

opaque eagle
#

Read the error

#

What does it say?

tight forum
#
let prefix = client.prefixes.has(message.guild.id);
#

i saw but

#

oh w8

#

uhm not worked

#

it says client.prefixes.has is not a function ok

#

but I didn't define it as function

opaque eagle
#

Then don't call it like a function

tight forum
opaque eagle
#

lol

#

show code

#

full file

#

not just one segment of it

#

hide your token if it's in there

tight forum
#

oh ok

#

there is no token here

#

it just prefix.js xd

wheat jolt
#

then send it lol

tight forum
#

w8

wheat jolt
#

this is for settings the prefix?

opaque eagle
#

Show your main file lol, that doesn't show where client.prefixes was defined

wheat jolt
#

yup

tight forum
#

lemme send u command handler part

wheat jolt
#

No

opaque eagle
#

i don't need no part

#

send the full main file

tight forum
#

oh ok

wheat jolt
#

or show the part where client.prefixes is defined

tight forum
#

damn it

#

w8

#

DAMN

#

I DID IT

wheat jolt
#

whatever

tight forum
#

freaking prefix i've been trying for two hours

wheat jolt
#

hey don't use those words

tight forum
#

oh

#

sorry

wheat jolt
#

don't worry

tight forum
#

freaking more convenient

fallen prism
#

What are you trying to do with your prefix?

earnest phoenix
#
  
let cooldown = 30000
   
   db.fetch(`lastCooldown_${message.author.id}`).then(i => {

        if (i!== null && cooldown - (Date.now() - i) > 0) {
          let timeObj = ms(cooldown - (Date.now() - i));
          
        return message.channel.send(`Cooldown! Please wait a few minutes`)   .then(message => {
                message.delete(8000);
            })

how do i make it say after 5min
THISCMD is now available when cooldown expires

wheat jolt
#

huh?

earnest phoenix
#

so when a user uses !daily

#

for example : the cooldown sets 24H then after 24h the bot pings the user saying daily command is avaialble

wheat jolt
#

you have setTimeout()

earnest phoenix
#

i dont like setTimeout

#

cause if i restart bot

#

the whole thing colapes

#

why i want to use a db

#

for this

wheat jolt
#

then store the unix time when the command is available

earnest phoenix
#

Store a unix timestamp in a db

wheat jolt
#

Date.now() + 24h in ms

#

yup

earnest phoenix
#

Then Date.now() - 155551889091910

#

hm

#

That's a random number but

#

You can define one with Date.now() and then store it

#
return message.channel.send(`Daily ccommand avaialble`)
})```
wheat jolt
#

nono

earnest phoenix
#

Not really

wheat jolt
#

that will check once

fallen prism
#

IF you want to to routinely check use setinterval

earnest phoenix
#

No

#

hm im confused now :/

#

@earnest phoenix look your dm 2m

#

ok

wheat jolt
#

when the command is triggered, if the user isn't cooldowned, store the unix time + 86 400 000 in the db then put a setTimeout. when the timeout ends, you remove the cooldown and remove that unix time from the DB

#

and if the bot restarts, add a setInterval to the index.js where you check if there are cooldowns and remove them if the unix time + 86 400 000 is > than the current time (Date.now())

#

@earnest phoenix

earnest phoenix
#

hm

wheat jolt
#

I do this for my mute command

fallen prism
#

That is sort of how I do it too.

#

I use a Discord collection

#

instead of a DB

wheat jolt
#

too many collections

#

if you have cooldown for other commands, for mutes etc

#

:)

sudden geyser
#

@opaque eagle are you still having the problem you have? I think it might be because you call the listener like this.client.on("messageCreate", this.listener); and the this value is different

opaque eagle
#

hmm... what would i do to fix it?

sudden geyser
#

maybe try this.client.on("messageCreate", (msg) => this.listener(msg))

opaque eagle
#

Thanks

#

I did this to fix it js this.client.on("messageCreate", this.listener.bind(this));

sudden geyser
#

nice

fallen prism
#

I know this might be a silly question, but how do I go about catching mentions like @ everyone or @ here before they ping people?

earnest phoenix
#

you can't

#

revoke role's permissions to mention everyone if you don't want it to ping people

fallen prism
#

Okay. Makes sense.

#

I could however catch it with my regular word filter, delete it, and log it.

earnest phoenix
#

it's still going to ping people

#

except it's going to turn into a ghost ping

fallen prism
#

Yea, better to just let server owners that use my bot figure it out.

sage bobcat
#

One message removed from a suspended account.

topaz fjord
#

ok

opaque eagle
#

libdiscord

earnest phoenix
#

c isnt cpp

opaque eagle
#

oh didnt read that properly lol

bright meadow
#

I got pinged?

topaz fjord
#

libcord also isn't production ready

hushed berry
trim saddle
#

@hushed berry go heck yourself

hushed berry
#

😢

#

skullbite chan pls

trim saddle
#

actually nik

#

i need your help with something

hushed berry
#

😮

#

um

#

oh nvm

#

i thought my message got removed lol

trim saddle
#

i've heard groovy can play spotify playlists?

hushed berry
#

yes eyesFlipped

trim saddle
#

do you have a regex for playlist links/uris i could use?

hushed berry
#

🤔

#

i dont use a regex for it

trim saddle
#

really?

hushed berry
#

yeah

#

i find them difficult to maintain

#

so i avoid them for things like that

trim saddle
#

is it just accepting the playlist id?

earnest phoenix
#

do you really need a regex for it at all

hushed berry
#

i mean

#

regex is the standard way to do it

#

@trim saddle

#

no

#

I just parse the URL

trim saddle
#

so if it's a proper playlist url it should get parsed correctly and play?

hushed berry
#

yeah

#

i mean, literally just

#

try it dabGif

trim saddle
#

i mean i could easily try that

#

also uh..

#

it's hard playing spotify playlists considering the playlist GET has a constantly changing form of authorization

hushed berry
#

its not that hard

#

its just standard oauth stuff 🤔

#

just when you make a request

#

check if expired

#

if yes, refresh creds

#

then execute request

#

ez ala pz

trim saddle
#

mh.

#

lets see if i can make something like that in python

unique nimbus
#

@trim saddle You could put all urls in a list then make the play command repeat check the list until none is left

#

idfk

warm marsh
#

How to I mention an emoji. I know that sounds crazy but how do you do it with the id instead of
:name:

#

?

unique nimbus
#

\:name:

#

you bot has to be in the server

warm marsh
#

I never said it didn't work at all.

#

I asked a question and received irrelevant answers.

unique nimbus
#

thats the only way you can do it?

warm marsh
#

Nope.

#

I've seen the other way before, Requires both the name and ID and it's almost like a mention.

earnest phoenix
#

yes

#

you get the format by putting a backslash infront of the emoji

warm marsh
#

Ok

#

Thanks.

grim aspen
#

maybe you could try having a certain database @trim saddle, like storing the user's input somewhere in a file with the links, have it in a certain order depending on that input, and playing it in that order in and what nikki said

trim saddle
#

maybe

cursive dagger
#

Anyone know a way to get what IP a player is playing on (Forge 1.8.0 with java)

neon swift
#

Are you allowed to ask questions like that here?

vernal rivet
#

I don't think so

west spoke
#

You are

#

but why @cursive dagger

cursive dagger
#

@west spoke Need it for a forge mod.

west spoke
#

Ah

cursive dagger
#

@west spoke Mind giving me a doc page or smth? Can only find 1.8+ docs

west spoke
#

I have no idea

#

I was just replying to the two below yours

cursive dagger
#

ah ok

unique nimbus
#

@cursive dagger Try using the 1.8 docs

#

it might be the same

#

idk tho

cursive dagger
#

hmmm k

unique nimbus
#

Try using it

#

They may use the same code

#

use 1.13 it may work with 1.14

cursive dagger
#

Im doing 1.8.0

#

i know how to do it on newer versions, but not on never

#

*newer

unique nimbus
#

oof

pale ether
#

Not really a dev question; but does anyone know of any good bot hosts for .NET core bots? Been trying IBM's services, but it's been nearly 2 weeks and my bot still can't run on their systems --'

mossy vine
#

basically anything that can run .net core

pale ether
#

Was kinda asking for suggestions based on past experiences, I already had that much figured out :p

pine jacinth
#

do you have an idea @loud salmon on how to solve this problem? 😄

trail mountain
#

Hello, i have a problem

loud salmon
#

dbl ask2ask @trail mountain

covert turtleBOT
#

Dont ask to ask
Just ask your question
it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.

loud salmon
#

nope @pine jacinth

pine jacinth
#

:/ ok

loud salmon
#

@trail mountain did you read what I sent?

trail mountain
#

Oh

#

Sorry

pine jacinth
#

@slender thistle Thanks for kinda explaining it but I am getting an error:

dblpy = dbl.Client(client, token)
AttributeError: module 'dbl' has no attribute 'Client'

(Moved it to here)

trail mountain
#

When i Want to edit and then publish my server, then i get everytime error 500, i sent email's to discord bots and they didnt help me :/

loud salmon
#

oh

#

thats not a dev problem

#

log in/out

#

kick the bot

#

then wait 10-20 minutes

#

a shard might be restarting

trail mountain
#

Oh

#

Okay

#

I will try

pine jacinth
#

I think it might also have to do with fraudulent use off MD

slender thistle
#

@pine jacinth dbl.DBLClient

pine jacinth
#

Seems to be working 😄

trail mountain
#

Not helps :/