-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
π§βπ» Request for Channel Webhook Integration #52
Comments
Code snippet of how I am using it with DiscordPHP, cannot find a simple solution to this. :( `if ($messageCache->count()) {
|
Hi! I moved this to the framework repo. Can you give me a better example of how this would be used? I'm struggling to understand the purpose or how I could provide better DX for it. |
Hey! Sorry, it looks like it is the only way to dynamically set the bot name when sending messages. This is really useful for when you want the bot to change name (Dynamic AI Characters) or for when you want to create chat between applications by using the logged in users name. |
Ideally we'd implement something like I'd like to explore Webhook creation itself at a later date/in a separate issue. |
π§βπ» Add a `clearAuthor()` method to clear the default Message embed author/icon π§βπ» Add an `avatar()` method that aliases `avatarUrl()` for improved DX
#73 proposes a solution to this. I ended up adding the webhook creation as it made sense in this case. With the PR, your code would be reduced to something like: if ($messageCache->isEmpty()) {
return;
}
$messageItem = $messageCache->pop();
$this
->message()
->username($messageItem->getUsername())
->body($messageItem->getMessage())
->webhook()
->send($messageItem->getChannelId()); |
* π§βπ» Add a `Message::clearAuthor()` method to clear the default Message embed author/icon * π§βπ» Add a `Message::avatar()` method that aliases `avatarUrl()` for improved DX * π§βπ» Add `Message::thumbnail()` and `Message::image()` aliases for their URL equivalent
We would like to request the implementation of a webhook integration feature that leverages the existing channel->webhooks() functionality provided by DiscordPHP. This integration is sought to enhance our application's connectivity and streamline our notification processes.
The text was updated successfully, but these errors were encountered: