#development
1 messages · Page 1616 of 1
do message.channel.send
you need to define a channel
or just do message.channel.send
show your code
maybe i can help
its not the code,
the code is good
the event either isn't being emitted or received
Does it not work for one specific guild or completely?
Can you show your code? Are you sure there aren't any errors happening?
I mean i cant show it all but here
if(member.guild.id !== botConfig.internal.main_guild) return;
console.log(member)```
no errors happening
and if i remove that if statement still nothingg logs
like nothing is triggering the event at all
Did you allow the server members intent on Discord developer portal? Can you show how you're applying intents to your client?
Try explicitly specifying the intents
How the fuck do you set intents in d.js
shiv
i never have
and it worked in the past
and flaze, i tried it earlier and it didnt work
new Client({ ws: { intents: <array of intents or bitfield> } });
actually it still works
on my other bot
my main bot it works without me setting the intents
oh it's in websocket options
?
Well shrug there must be a reason why the event isn't fired
imagine intents=intents smh
is it me or is the sound quality of rythm really bad?
Literally, even my shitbot sounds better.
Bro discord.Client(intents=discord.Intents.all()) ftw
rythm massively cuts back their bandwidth
it honestly sounds like shit
so no one knows how to help?
hm
like my main bot uses the same thing and works flawlessly
what did you use?
ws: {
intents: [
"GUILDS",
"GUILD_MESSAGES",
"GUILD_MEMBERS",
"GUILD_VOICE_STATES",
"GUILD_MESSAGE_REACTIONS",
],
},
});```

They recently changed intents to be not in as
really weird
aren't they using stable
I hadn’t scrolled up yet ^^
soooo, what do i have to do to make this work then, or do i give up all hopes and dreams of coding and decide to work in a retail store?
But then you’d have to deal with,,,, people
true
try using your bot token on your other bot and see if you receive the event
let vartest = client.cool["action"].get(guild.id).get("lastaction"); console.log(vartest)
it returns nothing
action: Map { '757210469563105381' => Map { 'lastaction' => [Array], 'time' => 1, 'count' => 1 } },
this is the full map
it didnt
how do i make the bot only show the first 20 roles?
(node:23761) UnhandledPromiseRejectionWarning: TypeError: msg.delete is not a function
at Object.execute (/app/Commands/Fun/qrcode.js:25:14)
at module.exports (/app/Events/Messages/message.js:38:11)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:23761) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 11)
(node:23761) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
at RequestHandler.execute (/app/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async RequestHandler.push (/app/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
(node:23761) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 12)
ergh
const { Discord, MessageEmbed } = require('discord.js');
const { deletionTimeout } = require('../../config.json');
module.exports = {
name: 'qrcode',
description: "Crée un qrcode pour un texte.",
usage: "qrcode (texte)",
execute(message, args, settings) {
// Get text for QR encoding (including file URl)
let text = args.join(' ');
if (!text) text = message.guild.GetImage(message, args, settings.Language);
// send 'waiting' message
const msg = message.channel.send(settings.Language, 'IMAGE/GENERATING_IMAGE');
// Try and convert image
try {
// send image in embed
const embed = new MessageEmbed()
.setImage(`https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${text.replace(new RegExp(' ', 'g'), '%20')}`);
msg.delete();
message.channel.send(embed);
} catch(err) {
// if error has occured
msg.delete();
message.error(settings.Language, 'ERROR_MESSAGE').then(m => m.delete({ timeout: 5000 }));
}
}
};
mine went up
what message do you want to delete?
You can use roles.first(20).map()
the one sent by the user?
okok, thank you
the const msg
await
should be there
const msg = await message.channel.send(settings.Language, 'IMAGE/GENERATING_IMAGE');
@earnest phoenix
this should be correct
const msg = await message.channel.send(settings.Language, 'IMAGE/GENERATING_IMAGE');
^^^^^
SyntaxError: await is only valid in async function
:/
yes
put it in async function
i am dming you the correct code
done
sent

I can feel flaze's disappointment
physical pain? 
Pretty much
(node:5697) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined
at Object.execute (/app/Commands/Moderation/snipe.js:10:31)
at module.exports (/app/Events/Messages/message.js:38:11)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5697) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:5697) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I have the problem
const Discord = require("discord.js")
const db = require("quick.db")
module.exports = {
name: 'snipe',
description: "Donne le dernier message supprimé du channel.",
usage: "snipe",
async execute(message, args, client) {
const msg = client.snipes.get(message.channel.id)
if(!msg) return message.channel.send("❌ Il n'y a rien à snipe !")
const embed = new Discord.MessageEmbed()
.setAuthor(msg.author)
.setDescription(msg.content)
if(msg.image)embed
.setImage(msg.image)
.setColor("00FFFF")
.setTimestamp();
message.channel.send(embed)
}
}
My code: ⬆️
client.snipes is undefined
but how to define this?
its with discord.js no?
oml
v12
where did you define the snipes map?
wait
Hello, I would like to know how to comment on incorporating his website in the description of his bot
@copper cradle in async execute no?
iframe html tag
let's say you got a listener somewhere that listens for deleted messages, when a message is deleted then you store it's content and id on the <client>.snipes map
where in your code did you do something along those lines
I don't do this :/
Ok thank you I'll find out about this
so you never defined a snipes map
then what did you expect to happen by trying to call get on something that's undefined
where did you get that code from
then ask your friend how they did it
I could help but I just woke up and need to get some breakfast
I'll be back in like 1Hr
why?
do i send you the correct code for snipe?
imagine a regular member helping a bot developer
you'd be surprised to what "bot devs" ask here
mhm
ples tell me some of the things
imagine a bot developer being spoonfeeded
just scroll up a bit, you'll find some hilarious ones
bruh, i am not spoon eating
oh wait
for who was that message?
you
how?
you mean, i stop this?
then word it better
"I am dming you to explain how to solve"
"do i explain how to make a code for snipe?"
the way you worded sounded like you were sending paste-ready code
i just added this in the code
and sent it to him
and then still he got an error
he was doing await in asyncn't
Wtf
$3000 a week in bitcoin mining? LMAO thanks for the laugh
Yea
first you tell, why do astronauts use linux in space?
if you answer it correctly, then i will ask you how
Yea
Lmao
its just for a bitcoin scam 
Yea
How's he not banned yet
ig he got betrayed by a girl who liked bitcoins
Idk
or her crush trades bitcoins
ID?
Lmao
or is a miner of bitcoins
Great story
ofc
man should have asked that before the message got deleted 
Must make a story on it
-b @nova otter ads in every channel
Banned henry.michael#7573 (@nova otter)
brooooooooo
Hello prime minister

you could have made it sound better
bye 👋

aww
;-;

MINE DIAMONDS!
bruh
Lol
Good idea tho
american will come
Lol
guys, i need to become fit, but its very boring
do you have any food which might help?
I didn't mean that kind of coke...
is anyone able to offer me some assistance with discord js if they dont mind? >.< i've hit a brick wall and am noob...
whats the brick wall
ive made an embed that posts when a command is typed in a channel (basic i know) but im struggling trying to get it to post automatically in a public channel when a private channel receives a message from a webhook and im not sure where i need to add the 'if' function (if thats even right) and basically say if this channel receives a message, send the embed in this channel >.< @ornate otter
ive tried stackoverflow/youtube/github for ideas but not having much luck
whenever i try to await reactions asynchronously using the .then statement it doesnt seem to work?
get the channel from cache
client.channels.cache.get("the id of the channel you’re sending to")
then send to it using .send() on the .cache.get() thing
ooo will give it a go!! tyvm
np
The specific version, type npm ls discord.js in console
is there a way to see all reviews as the bot owner?
I'd love to know what are people unsatisfied with 
is this right @misty sigil ?
if (message.channel.id === '809759051919523860') {
client.channels.cache.get("809508561918230559")
const embed = new MessageEmbed()
.setColor(16763136)
.setThumbnail('thumbnailurl')
.setDescription("choo choooooo")
.setTitle(`🚂 TRAIN COMING THROUGH!`)
message.channel.send(embed);
}```
almost
you can do const channel = client.channels.cache.get("the ID")
and then at the bottom
channel.send()
12.5.1
i feel like only Tim can help you now
LMFAO
Can I like reward people for voting for my bot?
why is tim so popular?
@quartz kindle almighty tim, we having big issues
const msg = message.channel.send(Econfirm)
msg.react(':white_check_mark:')```
It shows msg.react is not a function
Or using .then()
For more details on promises and how to use them, see https://js.evie.dev/promises
I'm writing a bot for myself what do I have to do to set its prefix
Do you want one global prefix or do you want each guild to have its own?
@dusky harness stick to this channel, and answer my question 😉
aDs
I want it to be mine
that... doesn't really answer the question
yeah...
Same for everyone, or different one per guild?
Please choose one of the 2 choices above
I know Turkish, so I'm a little late
what about both evie
Take your time!
same for everyone
actually that's possible with just a tiny bit more work but yes
hmm?
ok and what programming language are you writing this in? Javascript? Python?
lua
atom

gl with that
Javascript
Python
I'm writing from atom
in what language tho
-b
That's your EDITOR, not your language
@dusky harness Can you send a screenshot of your code?
yes
I bet this is discord.js but we'll know in a second.
c#? sorry bro i only know b♭
what if its discord.io
You never know
:^)
js
discord.io is still one of the first results if you google how to make a discord bot
oh no
nah
partial
can't see most of it
it's missing enough characters it's fine
anyway what is the problem?
ok
actually, the last part is timestamp
@dusky harness Here we go: https://anidiots.guide/first-bot/your-first-bot#using-a-prefix
hmmm
I thought the first part was
oh, nvm then
soooo,
ye first part should be the timestamp
AHAHAHA, YOU LEAKED YOUR TOKEN
long story
thank you so much
Had you been paying attention you'd have seen we said that wasn't enough of the token to use it
someone will hack
its not the full token
Türkçe konuşan var mı
chill down bruh
bruh
Does anybody speak Turkish
The token's first part is a timestamp, then the ID, and only the last part is the "password". Removing like 4-5 characters from the end is enough to make a token completely unuseable.
#general-int does
Tim, basically, my event isnt working, client.on('guildMemberAdd') just isnt actually being called, me and shiv and flaze aren't able to work out why
But most of the programming world is english so you might as well practice.
is guild_member gateway enabled?
I presume your intent is turned on in the portal and you've turned on the intent in the client.ws ?
Yes
how do we add the time the embed was sent in the footer of the embed?
It is, flaze and shiv have already been through this
setTimestamp
but it still no wanna play ball
ahk
what about client.on("raw", p => { if(p.t === "GUILD_MEMBER_ADD") console.log(p) })
wait, is tim the man, the legend, the god?
why you gotta make this so difficult, but, ill try it
the best in discord.js
tim is helping you debug kekw
bruh, everyone says tim is the best
if that fires there is another issue
not difficult, just seeing if you even get the packet
if it doesn't, there is an issue with intents
he is
yeah, nothing tim
do you have server members enabled in the dev portal?
are you using discord.js stable or master?
and idk
"you've been told"...?
i cantttt its not my bottt, im just the dev
that could be an issue
show your intents
run it without intents
how does one show intents
if not getting the event, its their issue
show client options
screenshot, copy paste client options
example?
so i was testing and when i got to using my unban command i got this in my terminal ```discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ValueError: not enough values to unpack (expected 2, got 1)
ill post my code
client = new Discord.CLient({ // options here })
CLient :)
what is discord.js master?
Yea
the version from github
i dont do that
Show your code
never have
is it better?
just const bot = new Discord.Client();
not master, right?
its always worked for me in the past
@has_permissions(ban_members=True)
@commands.command()
async def unban(self, ctx, *, member):
banned_user = await ctx.guild.bans()
member_name, member_descriminator = member.split('#')
for ban_entry in banned_user:
user = ban_entry.user
if (user.name, user.descriminator) == (member_name, member_descriminator):
await ctx.guild.unban(user)
await ctx.send(f'Unbanned {ctx.author.id}')
return```
you don't have members enabled in the panel then
Well, once the owner is online i'll check but he says it is
ok
To rephrase my question, how are you using the command?
!unban <user>
What is <user>?
then do this ```js
client = new Discord.Client({
ws: {
intents: Discord.Intents.ALL
}
})
the user you want to unban
Got an example?
Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted.
there you go
yeah, it's disabled
you have it disabled
!unban @safe creek and !unban Carpal#1211 should both work
one or the other
Cus i believe he only has one enabled
They shouldn't and won't
Thats the one he says is enabled
The latter will because of #, the former won't because it's a mention
ahh ok i see
But until he's online and sends me a screenshot i wont know for sure
guys, in this the bot should react to the last message with an emoji, but when the server traffic is high the bot doesn't react, what do?
module.exports = {
name: "lol",
description: "lol",
category: "emoji",
run: async (bot, message, args) => {
let channel = message.channel;
channel.messages.fetch({limit: 2}).then(res => {
let lm = res.last()
lm.react("770535724704989194");
message.delete();
console.log(`the reaction was in ${message.guild.name}, the user was ${message.author.username}`)
})
}
}
Two ways go about this
ratelimits
Actually, maybe even three
how to solve? don't add a reaction to every single message
is not better, it just has the newest features like gateway v8, slash commands, etc. but it can be buggy or have other issues because of untested updates
they're good for specific things
i don’t mind them but I won’t be implementing them
i havent actually tested them tho
- Check for
member.split("#")length. If the length is < 2, argument is invalid, don't unban anyone; - Allow IDs and then straight up use
.unbanon adiscord.Object(id=the_argument_value);
2.1) As for mentions, logic is similar, because all you need to do is.strip()anything that's not an ID, aka<@!>.
Im curious as to how they will expect us to input our bots command list
whether it will be on the application site or what
oh ok i see, ill probably just do the mentions and id
ty
Sure, choice is yours
>>> s = "@ebon shadow"
>>> s.strip("<@!>")
'123'
>>> s = "@ebon shadow"
>>> s.strip("<@!>")
'123'
Well, s is just a variable in my example
aka what you'd receive from member
mhm
yo I’m gonna see if there are any eggs
so member.strip() blah blah blah then
You got the gist of it
.strip() removes all passed characters from the string and returns a modified string
A more verbose example would be
>>> s = "@ebon shadow"
>>> s.lstrip("<@!").rstrip(">")
'123'
See where I'm getting at?
.strip() just handles splitting of a string based off of the current text encoding you have
by default JS I believe does utf-8 encoding
so it'll just handle splitting through that
you can define it however to do other things like ANSI encoding and split likewise
ahh ok
>>> help(str.strip)
Help on method_descriptor:
strip(self, chars=None, /)
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
tfw JS automates removal of newline and lead-trail whitespace but PHP's explode doesn't


PHP is just weird man
PHP is a futuristic language
not as bad as lua
true
instead of iterating, mapping and joining
yes i agree, PHP is a "WTF" language indeed
did the creator just have a stroke when deciding what to name functions?
yes
accidentally typed the wrong word
probably also on drugs
he was watching a WWII documentary
some functions are fn(source,destination), others are fn(destination, source)
for no reason
big brain novice dev
yes, tim the man
I mean he wasn't
nah
the fuck
mine is in 7
8k
Does it really matter what we've made? As long as we help you 
slight flex
3 of those are mine
lmao
mine is 82 servers
mine is in 7 too 
I have like 76
time how to get my bot in many servers?
xd
Mine is 154
well, the mother of botname.8kserver is is smarter then that of mother of mee6
ig
wat
nvm
wut
godzilla had a stroke reading this
Did you just call Mee6's mother fat?
oh wait, you didn't answer this^
Yes, that question was answered. The answer was "rate limits"
what can be a good programmer nickname on a server?
a normal name
oh, ok
xD
wait, i need to ask tim too
why do astronauts use linux in space?
because linux is better
no
İf u dont have Programmer socks,u are not a real Programmer
BECAUSE YOU CANNOT OPEN WINDOWS IN SPACE
😩
xD
still waiting
what is that?
ok
oh wait, people, is doing dual boot safe?
too lazy to install d.js-light master branch
i want unbuntu and win
lmao
if you dont have hair on your feet,u are not a real Programmer
if you have friends and life you are not a real programmer
thats just true
so true
having dev fends is allowed
oh
do you know my potato in java was over countered
Hi
i like java
so many code friend rules
İ forked a patato
chat ded
I forked a piece of lettuce
[object Object]
could we get back to actually helping people code? Remember guys, some people are shy and won't ask their question if the chat is too active 😦
Can i fork github 
maybe const role = "cunt";?
Idk yet
oh
yo cowards, ask your problems, don't feel shy, if you feel shy here what will you do while seks
Guys anyone know how to make an inventory/backpack, i dont want code i just dont have enough logic on how i would store and find things like arrays or objects???
database
so, whats the issue?
think like this:
How would i find the object when it needs to be removed
id
A loop?
Yea but mongoose returns an array of objects
So each object would be a profile
Then inside that profile would be a nested object
{
id: "toiletpaper",
name: "Toilet Paper",
properties: ["burnable"]
}
for example
Ik that
then just remove by id toiletpaper
Ola uwu
findAndSomething
for example
get user inventory, remove item by id
const toremove = Array.find(obj => obj.id == "toilet paper")
delete toremove
Would that work
there's probably some function to do that inside mongo
you can splice it away
you want to remove the mongodb document?
find and when you have the object indexOf, then you know the postiion where to splice(position, 1)
You did same joke 2 days ago and it is not funny
it was for tim
he wasn't there 2 days ago
kinda sorta
I'm confused on how to go about it
because I want to create a webhook but not have it bound to a channel
but my understanding is that you can only do that with a partial method
Ok I'm confused what you mean by partial webhooks now 
oh jesus christ
hm?
I forgot that's how it's done
ig
Well, yeah, that's how webhooks are
i can work around the channel part since d.py allows me to change the text channel link
the problem is being able to create it i think
If you want webhooks for different channels, you'll need to create multiple Webhook objects separately
yeah
yeah
it's a constant process of deleting and creating
which i'm not like super angry about
you can automate it though
it's feasible mhm
yeah
i'm wanting to do webhooks for a specific idea of mine
i just don't understand how to create them
Why deleting though?
Sec
1 overall webhook ID or a pseudoID
Flask script mainly to handle POST requests from top.gg - shivaco/DBL-python-webhook
Well if you don't delete them
they're gonna clog up the whole server
you're gonna have like 300 webhook integrations in the server settings 
reuse it
hmm
Holy
you can use different names and pfp each time
thankfully lmao
i'm in VC if you guys want to look at it
because i'm so perplexed
i preferrably want to do it from guild point
yeah, but its not that hard to check if it exists
yeah
and i preferably would like to do it from the guild point lol
combing through each text channel and checking for a webhook is err
maybe not the best route to take
that's basically making me go
"each message in the server, read every single text channel and look for that webhook, and modify"
that's bad
Jesus
nope
pog
well yeah that's why i don't want to do it with text channels
Manual caching
even better
hmmm
let me see if i can get some feasibility out of the guild.webhooks method first, if not i can manually store it through DB
lol not great for future proofing
well
all we are trying to do is grab the ID
we're not trying to hold actual data about the message contents or that
we can manually update the webhook's information from our end upon the instance of the message
"Improvise" is my motto wdym
how do I get words with outline effect in node-canvas?
if I used a {channel_id: webhook_id} i think for the most part it's fine
lmao thats good
yeah sure
how would it get deleted though
it might be worth checking and retrieving it each time rather than storing it
if a user deletes it
{channel_id: {id: id, token: token}}
found an answer
i don't think you can just up and go with deleting a webhook
yeah, its not if someone does, its if they can
hmm
i'll have to look into a solution for that down the road because quite frankly
if someone did that
big dumb
lmao ok
good on you lol
plus i don't think most server owners are intelligent enough to check their webhooks periodically 😂
yeah
i can't user-proof admins lol
just in case
expect the enduser to be a donkey
users as in the ppl who use your bots
can you somehow check if the webhooks are still healthy?
what are you implying... 👀
just expect that the enduser is a donkey, if a donkey can use it pretty much every user can
just see if your webhook is there
that's what i'm currently doing
basically on bot start it combs through the guild webhooks, it'll then check for the same name or ID
these are all great solutions for finding the webhook
but i still have the issue of making it lmao
i cant find it lol
yeah i wouldnt suggest that tho
lol then switch to js, iirc d.js can create webhooks
this is the only way you can do it
i'd have to call it on the message context's channel ID
actually nvm
that works
thats good
make a setup command, and ask for what channel the webhook should be generated

guys, how download kali linux?
like other linux distros
if you burn your pc, it will auto install
the top link, right>
If you need to ask how to download a distro you're not ready to download a distro.
Could someone explain to me, why this is happening?https://sourceb.in/KHOhzHYNVM - Command
Don't get anywhere near linux until you can install linux without having to ask people how to ddownload linux 
there are 2 webhook types now i need to check for
channel_follower instance of the Webhook object if it's for announcement channels of other servers
and then a regular one

no you dont
yeah
you only need one right?
try let reply = ''; because right now let reply; is exactly like saying let reply = undefined; and undefined + 'blah' is 'undefinedblah'
your author is undefined
correct but i can also potentially target a channel webhook
it obv won't impact shit but the code wouldn't then work
hmm
nope, wrong, sorry ^_^
hi
ah, thanks
yup, that was it c:
@latent heron webhook.type
oh pog
I forgot those exist
so here's my idea
what exists?
i have a cog listener for when the bot joins the guild it makes a webhook for this on the first channel it finds
i save that token somewhere
and then i can just refer to it from there on out
who can help me make server bot @everyone
yeah sure
idk exactly what youre doing
channel_follower type
can somone dm me so there can make me bot
@drowsy crag -needdev
-needdev
DBL is not a place to find developers for jobs. You can try and put a request on Fiverr or Freelancer. Please do not post the request again. Doing so may result in punishment.
thanks
@latent heron can help me make bot
no i can't
@drowsy crag
go learn how to code
-needdev
bruh idk how i know how code but i dont know
then study how to make a bot
this said i can get help
i going pay somone
-m 700880831098650674
🤐 Muted JJandTtv#3301 (@elfin rune)
whats the best bots?
that depends
Ask an engineer that and then ask a Discord bot community
You'll get different answers
Reason: "best" is subjective
yeup
ok thanks
alright
so i've achieved the ability to find the webhook and edit it to send what i want
and then i realized there is no d.py method to change the text channel it belongs to 
Can you even do that in discord normally?
yea
no lol
you can change the webhook after you create it
at least as a user
there's probably just no actual API method for it if i had to guess
I don't think you can change the webhook's channel
yeah but thats bot the same
i thought you were trying to create something for the system channel
if you wanna send a webhook in a channel, you need to have a webhook in that channel
i think so, but you still need to have the webhook in that channel
lmao
you can create webhooks with the bot
are you sure?
yeah
im looking through all of the docs
even on the create webhook event you can't declare the text channel because it's contextually based
which means unless i want to manually send HTTP requests to discord
you're right, no option to change channel lmao
i'd have to do the really horrible method of combing through text channels
You can technically abuse bot.http
make a PR for it
sec
sounds fun
yup
apparently not
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
I see
you need webhook's permission, but yes you can
lol some dude said "fuck you" and left the vc
Yeah, aiohttp to the rescue
thanks very cool
is it fixed yet?
make a PR to discord.py
Not yet
should be simple to add a channel_id field
it's just an extra JSON parameter Danny would have to pass for his HTTP request
idk why he didn't add it
imo easier to implement that yourself than making a PR
Probably forgot or didn't consider it useful enough
thats pretty cool
async def modify_channel(channel_id: int):
# yada yada
discord.Webhook.modify_channel = modify_channel
``` inb4
I just tried it
how?
hmm?
Wait what on earth is happening, it returned something but didn't actually move it
It can?
brr no clue
I don't think it officially can
I mean because it takes arbitrary keyword arguments
this is insane
because through discord http request i now need to read the whole json struct
and then put it back into a way for d.py to understand it
then i can finally edit it
holy fucking shit this is so stupid just for a workaround
because it's just calling this
you can piggyback on the webhook_update event
send the request, then wait for the event to arrive
im better off at this rate using plan A
which was making a new webhook and deleting it after
because there's no way to modify it or keep active track
idk, it's fruitless to me to make a modification of the d.py source when i'll update it in a few weeks and it'll override all of the code changes i made
you could also override it at run time
not sure if py supports modifying class prototypes like js
that's unnecessarily complicated though
none of this should have to be done in the first place
its an API wrapper which serves the sole purpose of being a way to work with an open-sourced API through a lang
that's counter intuitive of what it's purpose is to do
just fork it, then PR it. use your fork while you wait for merge
bro
Can't this apply to your use case
Oh
sorry if it sounded a little off
Well I'll be praying for you while doing my homework
a bit heated by how something that's literally a passable argument didn't make it into the wrapper
LMAO
i'll make a pr this evening about it
Good luck 
constructive? man i was about to lose my shit 😂
haha but youre getting there
oh bruh, I just realized d.py uses token on its url and the endpoint ignores channel_id parameter
it's just purposefully ignored
cant wait for my bot ms to go up + 30 because of this new revolutionary concept of reading every text channel now 🤣 🔫
tried that
unfortunately.
it's that or the way im having to write it: find the old one, delete it, create a new one for that new channel.
that's the most efficient approach i can see being feasible for now
you you need to delete it?
this is the code from discord.js
const data = await this.client.api.webhooks(this.id, channel ? undefined : this.token).patch({
data: { name, avatar, channel_id: channel },
reason,
});
no?
yeah you gotta do this, fucking danny
i know that at least in d.py you can't without a class method calling straight from a dict source
which very few d.py objects even support, i know one being Embed
that's absolutely mental
Shift to hikari 

Python with strict typing when
tfw asymmetric indents break the whole script because you can't dynamically handle lexing
😳
oh god
most languages can deal with tokenization just fine
idk why py requires indentation
this is why im slightly glad i tried learning how to code a programming lang in order to research how this shit works
just learnt today that js only exists because of java


