Commit Graph

91 Commits

Author SHA1 Message Date
Qais Patankar 1420f68050 Check only bridged channels for PermManageWebhooks (discord) (#1001)
* Check only bridged channels for PermManageWebhooks

* add note
2020-02-08 15:13:23 +01:00
Wim b85bae31d9
Show file comment in webhook if normal message is empty (discord). Fixes #962 (#995) 2020-02-02 21:14:54 +01:00
Wim 4c44515f9d
Fix channel ID problem with multiple gateways (discord). Fixes #953 (#977) 2020-01-09 23:54:04 +01:00
Wim ff0de85817
Remove obsolete file upload links (discord). Fixes #908 (#931)
Since v1.16.0 we now can upload files via webhook.
Old way of showing files with webhook only setup can be removed.
2019-10-27 01:10:43 +02:00
Qais Patankar ba6759010b Add UserTypingSupport (discord) (#914)
* Add Discord to UserTypingSupport

* discord: start typing in a channel on EventUserTyping receive

* discord: emit EventUserTyping to gateway
2019-10-04 00:18:56 +02:00
MOZGIII cec086994e Add support for sending files via webhook (discord) (#872) 2019-08-29 00:13:10 +02:00
Wim 7d2e440c83
Add support for discord category channels (discord) (#863)
This adds support for the discord category option that can be used
to group channels in. This means we can have multiple channels with
the same name.

We add the option to specify a category in the channel option of a
discord account under [[gateway]]

Besides channel="channel" or channel="ID:channelID", now also
channel="category/channel" can be specified.

This change remains backwards compatible with people that haven't
specified the category and incorporates the fix in #861
2019-07-15 21:56:35 +02:00
Qais Patankar 5551f9d56f Fix discord channel & category name clash. #860 (#861) 2019-07-14 19:53:09 +02:00
Qais Patankar e60949ff3f Support webhook message deletions (discord) (#853)
* Support webhook message deletions (discord)

Messages sent via webhook can now be deleted. It seems it can do this
without any special permissions.

This copies discordgo.WebhookExecute and makes it support the returning
of discordgo.Message.

A pull request has been sent upstream, so we should use that if
@bwmariin accepts the pull request:

https://github.com/bwmarrin/discordgo/pull/663

Changes in behaviour (webhook mode only):
- Previously messages *edited* on other platforms would just be
retransmitted as a brand new message to Discord.
- Message *edits* will now be ignored.
- Debug: message edits will now print out a "permission error".

In the future it may be good to send an "message edited" react to those
webhook messages, so at least people know that the message was edited on
other platforms. (Even though it can't actually show the new message.)

Alternatively, message edits could just send a brand new message with a
link back to the old one. This is a little ugly but it would ensure that
Discord users are able to see the edited message. These "message edit
notifications" would be sent from the bot user (not from a webhook), so
we could edit the "edit notification" if subsequent edits to the
original message are made.
2019-07-08 22:18:37 +02:00
Qais Patankar 76c7b69e4e Support bulk deletions (discord) 2019-06-16 16:07:48 +02:00
Wim b09a73040f
Print errors as string instead of %#v (#738) 2019-02-26 17:21:23 +01:00
Wim 0bcb0b882f
Support join/leaves from discord. Closes #654 (#721) 2019-02-17 21:49:45 +01:00
Wim e3cb665d92 Make discord user token work correctly (discord) #689 2019-01-19 20:39:58 +01:00
Wim d99eacc2e1 Run go fmt 2019-01-14 19:41:32 +01:00
Zomboy Alfrir 62e55214fc Allow to bridge non-bot Discord users (discord) (#689)
If you prefix a token with `User ` it'll treat is as a user token.

Co-Authored-By: zomboy-alfrir <zomboy@dancodes.com.ar>
2019-01-14 19:27:49 +01:00
James Nylen 5193634a52 Use only one webhook if possible (discord) (#681) 2019-01-09 21:28:47 +01:00
Wim 46e2683995 Add file comment to webhook messages (discord). Fixes #358 2019-01-07 22:16:00 +01:00
James Nylen 492722af8b Improve error reporting on failure to join Discord. Fixes #672 (#680) 2019-01-07 21:39:53 +01:00
Duco van Amstel 0365c0786a Split Discord bridge in multiple files (#632) 2018-12-07 23:36:01 +01:00
Wim df02f51c56 Fix regression on using server ID (discord). #619 #617 2018-11-28 23:50:40 +01:00
Wim c6fd65d1d7 Limit discord username via webhook to 32 chars 2018-11-23 20:52:31 +01:00
Duco van Amstel ce21ba1545 Fix golint linter issues and enable it in CI (#593) 2018-11-15 20:43:43 +01:00
Wim f8dc24bc09 Switch back go upstream bwmarrin/discordgo
Commit ffa9956c9b got merged in.
2018-11-13 00:02:07 +01:00
Wim 399789811e Make gocritic linter happy 2018-11-08 00:46:34 +01:00
David Hill 0e2522279e Clean up various stuff (#508)
* various cleanups
2018-11-07 20:36:50 +01:00
NikkyAI 54adb0509e Fix mentions cuttíng off all text after the mention (discord) (#506) 2018-09-29 20:02:59 +02:00
Wim bd3a3b6eaf Let webhook also replace mentions (discord). Closes #502 2018-09-22 22:15:19 +02:00
NikkyAI 296428d53e Fix Discord mentions by populating the nickMemberMap at connect (#498) 2018-09-17 21:25:06 +02:00
Jerry Heiselman a431a4fa04 Replace @... string with user mention if match found (discord) (#492). Closes #460
* Added check for @-mention pattern and replacing it with a user with a matching Nick on incoming messages
2018-09-12 22:30:14 +02:00
Wim 7f3cbcedc0 Use own forks for logrus-prefixed-formatter and discordgo 2018-08-06 21:11:13 +02:00
Wim 2597c9bfac Clip too long messages sent to discord (discord). Closes #440 2018-07-22 00:28:17 +02:00
Wim 93307b57aa Skip empty messages being sent with the webhook (discord). #469 2018-07-21 23:19:11 +02:00
Wim ed062e0ce5 Add a space before url in file uploads (discord). Closes #461 2018-06-29 22:35:29 +02:00
Wim a69ef8402b Fix previous commit 2018-06-28 21:19:02 +02:00
Wim 8779f67d2d Allow join-leave and topic changes to webhook (discord) 2018-06-28 21:14:31 +02:00
Liam Stanley 51327a4056 Reconnect on quit. (irc) See #431 (#445)
* potential fixes for #431
* go: fix formatting/gofmt/goreturns
2018-06-09 12:47:40 +02:00
ValdikSS a12a8d4fe2 Send mediaserver link to Discord in Webhook mode (discord) (#405) 2018-04-17 23:52:48 +02:00
Wim b4aa637d41 Add channel debug (discord) 2018-03-17 22:56:58 +01:00
Wim f2f1d874e1 Use viper (github.com/spf13/viper) for configuration 2018-03-04 23:52:14 +01:00
Wim 594d2155e3 Improve debug messages 2018-02-28 22:23:29 +01:00
Wim 2bac867382 Refactor using factory 2018-02-27 23:22:12 +01:00
Wim 73525a4bbc Make gometalinter happier 2018-02-27 23:22:10 +01:00
Wim d62f49d1fc Skip events for webhook 2018-02-27 23:22:10 +01:00
Wim 3d8f15c20b Refactor discord 2018-02-27 23:22:09 +01:00
Wim d1227b5fc9 Use prefixed-formatter for better logging 2018-02-21 00:20:25 +01:00
Wim 6ea368c383 Move Sirupsen => sirupsen 2018-02-20 23:41:09 +01:00
Wim a082b5a590 Remove unused code 2018-02-15 00:07:25 +01:00
Wim bae9484df2 Use discordgo ContentWithMoreMentionsReplace (discord) 2018-02-14 23:05:50 +01:00
Wim 83c28cb857 Check for a valid WebhookURL (discord). Closes #367 2018-02-07 14:57:38 +01:00
Wim 80822b7fff Send chat notification if media is too big to be re-uploaded to MediaServer. See #359 2018-02-03 01:11:11 +01:00