Unable to get all Webhooks - Permissions?
Would I be correct, in saying even if a Bot has setup a Webhook to the News Channel of a Server it is Admin of (Bot Server), that if the bot loses scope over the connected Channel, that the Webhook is effectively invisible to the Bot?
19 Replies
Unknown Userβ’3y ago
Message Not Public
Sign In & Join Server To View
v14.3.0
I am using:
And even though my Bot is in the Source-Server, and can see the news channel
The webhook that connects this channel to one of my "client servers" shall we say, does not appear in
guildWebhooks
User of Client Server has confirmed they are getting these Alerts
So it seems I effectivly have no scope over who is listening to my channels, even though Bot is in their server
Bot has basics, so view of some but not all channels, and manage webhooks
Would channel partials help? all I need is the Id; or to just know they have one setup
I don't mind that they have one, I just want to know if they do
So the system of my bot is only I am in the server where this NewsChannel is, and only the Bot gives other Servers a way to subscribe
Not with invites disabled, who said it bas to be public?
So this is super odd, I just added a webhook with my bot, rebooted the bot, and it can still identify the webhook for the channel it has no access to π€
Yet as someone else showed me, they get my alerts even though the
/getWebhooksForBot
says there is none π€No mention of channel-defined perms π€
I believe I have identified the initial problem, my Bot lacks Permissions in some form to the Channel.
It can't fetch the channel, but it does have it in the cache π€
Cache.get
Yup, full bot spin-down and re-boot and it's back in the cache
Wait what
Nope no adding
You can see the code I ran, literally post-boot
Yup got that
My Bot doesn't do anything more exotic, I don't manipulate the cache, literally at all
Lawful Good, I don't touch the special stuff
ok other than force fetching, but isn't that ok to do?
ah, are you thinking the force fetch, forces the channel into the cache?
I'll reboot the bot shortly then do a get of the guild, and return the channels
@qjuh
Fresh boot, and did
Get Guild
-> Get Channel
and same result:What did you mean by an APIChannel, as in the Raw API data, instead of the one DJS builds?
ah yes, apologies, to turn it into a file, I use
JSON.stringify
Not a bad idea, I'll make the change
Can do
Looks like it has no properties, other than channel
?
Those are from console logs @qjuh
I've copied the above from my logs app
oh sorry, work today has been crap
There we go
I'm logging off for the night, hope your evening is good
Will be around somewhat
So this is my bot's role in that server, neither the
id
or the tags.botId
exist in the overwrites.
So I can only assume my Bot has literally Zero access to the channel π€
Thanks Discord π
So I guess we've found 2 things:
1) Discord does provide data on channels the bot cannot see
2) If bot lacks perms to a channel, then it cannot detect webhooks for it even though it has Manage Webhooks