discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.91k stars 1.25k forks source link

support bots to use crosspost endpoint #1161

Closed Doc94 closed 4 years ago

Doc94 commented 4 years ago

I do not know if this has been commented before, but as a suggestion (to automate) it would be useful to be able to use the "publication" of messages in a different way than doing the task manually.

i ask about the endpoint https://discordapp.com/api/v6/channels/:channel-id/messages/:message-id/crosspost

Erisa commented 4 years ago

I second this request. As a game developer I have a git feed in my server which is setup as an announcement channel, at the moment I have to manually publish every message whenever there is a commit. It would be very helpful to be able to automate this with a bot, making the git feed accessible to anyone who follows the channel.

Jump-Suit commented 4 years ago

I third this request. Working on my own Unity C# Game using Discord Heavily, and having this would make Announcement Channels be just insert hand with inch motion here that much different and overall that good of a QoL change. That or have it as a Toggl-able option in 'Edit Channel Settings' to Auto-Post!

night commented 4 years ago

Disallowing bots to use crossposting is actually an intentional design decision. The use-case being shared in this issue is actually what we'd like to avoid, which is potentially spamming users who subscribe to news channels with git feeds or otherwise unpolished news. We prefer content to be edited and prepared before syndicated out to news channel followers.

macdja38 commented 4 years ago

This would be great for two reasons in my case.

1) We have a news channel that posts notifications of changelogs for a game, they are already hand edited and repaired… for the news to be useful it needs to be fresh. Any delays devalue the news. 2) Timed announcements, sometimes it's useful to be able to have a post go out at a certain time.

NurMarvin commented 4 years ago

I don't really need the feature myself, but I can see use cases for other people that where mentioned before. I myself would also see a use case in sending automatic status updates e.g. when a "service not available" system automatically detects that a service, that is critically needed for a game to run, is not available or responding slowly (or whatever else) it should be able to post an automatically published announcement instead of posting an announcement which the devs or other staff then have to manually publish. There's probably many more other use cases besides the one's already named and I don't really see a reason to not allow bots to trigger publishing via the endpoint.

I also don't really see a problem with

potentially spamming users who subscribe to news channels with git feeds or otherwise unpolished news

because if people don't want to receive commit messages or unpolished news from channel following, they shouldn't follow the channel to begin with.

Woeler commented 4 years ago

I don't think being locked out of valid use cases by design is a good thing. I think users can decide themselves what and when to publish things in their servers, as well as what and when to follow. This hand-holding measure is preventing a lot of cool features and interesting channels from utilizing the announcement feature.

We have a bot that:

These are all valid use cases, but we cannot use announcement channels because we are not going to have someone press the publish button every time these events occur. It entirely defeats the purpose of the bots we have built to take that weight off our shoulders.

I urge you to reconsider this design choice. If you let the user decide what to follow, you should also allow the publishers to decide what and how to post. Automated or not.

If a channel is too spammy, the solution seems simple to me: unfollow. À Propos the topic of spam, aren't these channels hard-rate-limited to 10 posts per hour?

MinnDevelopment commented 4 years ago

You can use oauth2 to create webhooks and publish to those. All of those use-cases should work fine without needing a developer license (which is required to get announcement channels in the first place). So you're not really "locked out of the use cases". You don't even need a bot for that.

Woeler commented 4 years ago

I'm not really sure what you are saying. We have a verified game dev server that has the announcement feature turned on. We have a bot in that server that posts into these announcement channels. We want our community to be able to utilize these channels and follow them. However, currently we can't use this feature as the bot messages in those channels cannot be automatically published.

z64 commented 4 years ago

He's saying, while you can't use announcement channels, you can use the OAuth2 webhook flow (documentation) to satisfy those use cases, which is even more powerful than announcements - as you entirely control syndication, and users can select what kinds of updates they are interested in, instead of the "everything or nothing" of announcement channels.

The downside being users must open their web browser to create the webhook and configure it later. If you like, this could be mitigated by using a bot instead of webhooks, by the sounds of which you already have. This allows users to configure within the client itself with some simple commands. This is still extremely cheap to host by passing a minimal gateway intents flags.

Woeler commented 4 years ago

Okay, I understand what you are saying. However, since our Discord server is official, we would like to centralize everything there. We do not want to have bots in thousands of servers, and we also do not want a web platform with an OAuth2 flow. We simply want to use announcement channels as one centralized publishing point. I won't argue that there are other means of distributing messages to lots of servers.

Publishing cannot be automated, that seems to be a fact at the moment. And I am arguing that this is unnecessary and prohibiting us from using what would otherwise be a very cool and convenient feature.

justcool393 commented 4 years ago

If a channel is too spammy, the solution seems simple to me: unfollow.

In addition, webhooks could have the same issue, just with a bunch of downsides and extra annoyances associated with them. If I don't want a webhook, I can just delete it. If I don't want an announcement channel, I can just unfollow it.

Our announcements in a server that has them enabled are official announcements from staff, properly formatted already and such. They're all ready for publishing so to speak, but this isn't able to be done automatically because of the limitation on it.

z64 commented 4 years ago

@Woeler Sure; I understand and am not saying what you want, in my opinion, is bad or invalid. I am just being realistic that Discord is unlikely, if at all, to move on this - it is a great exception that they go back on decisions like these.

I wanted to communicate the existing/established alternatives and the associated trade-offs between them, in case you weren't already aware, as they will likely be your only options for the foreseeable future.

chevcast commented 4 years ago

Disallowing bots to use crossposting is actually an intentional design decision. The use-case being shared in this issue is actually what we'd like to avoid, which is potentially spamming users who subscribe to news channels with git feeds or otherwise unpolished news. We prefer content to be edited and prepared before syndicated out to news channel followers.

Kinda feels like it defeats the purpose tbh. I think the philosophy here is a bit backwards. Especially considering followers can simply unfollow feeds they don't like and are probably subscribing to a feed knowing full well what they're subscribing to in the first place.

advaith1 commented 4 years ago

That's outdated; bots can do it now (see issue #1510 and pr #1692)

chevcast commented 4 years ago

That's outdated; bots can do it now (see issue #1510 and pr #1692)

Oh awesome! I came here because I noticed there's no webhook integration on announcement channels.

advaith1 commented 4 years ago

thats a (very annoying) client bug, you can still manage them by temporarily changing it back to a text channel or going to Server Settings > integrations

while messages won't be crossposted to other announcement channels, standard webhooks still work fine

Woeler commented 4 years ago

Excellent, I'm going to test this tomorrow. Been waiting long for bots to be able to do this.