Add automatic publish notification #17
Loading…
Reference in New Issue
No description provided.
Delete Branch "bro-features"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
minor tweaks
@ -243,19 +320,74 @@ func Retrieve(m *tb.Message) {
shared.Bot.Send(m.Chat, "--- Messages publiés ---")
}
// ToggleUpdates activate/deactivate automatic updates from the chat it's emmited
ToggleUpdates activate/deactivate automatic updates from the current chat
(just to keep consistency with the other descriptions, i'm a consistency nazi sorry mate)
@ -37,3 +37,3 @@
### Publish
**Description** : Publish a message to Alfred for this group chat and sends this message via MP to every subscriber of the group chat. The message can then be retrieved using the *retrieve* command.
**Description** : Publish a message to Alfred for this group chat and sends this message via MP to every subscriber of the group chat if the have not mutted it. The message can then be retrieved using the *retrieve* command.
if they* have not muted* it
@ -68,0 +71,4 @@
**Command syntax** : /toggleupdates
**note** : No notification can be send if the user has never done /registerprivate on a private chat with the bot, this is a limitation of the telegram bot API.
note instead of note to be consistent (I know)
@ -4,2 +4,2 @@
* @Last Modified by: klmp200
* @Last Modified time: 2018-07-24 17:49:51
* @Last Modified by: Bartuccio Antoine
* @Last Modified time: 2019-01-02 22:37:58
I hate your fkin headers x) <3
2 swag 4 u <3
Well done!
@ -50,6 +116,7 @@ func setPublishedMessages(chatID int64, messages []tb.Message) {
// Subscribe user sending the command to the current chat
// Command syntax : /subscribe
func Subscribe(m *tb.Message) {
Why an entry?!
:P
For lisibility :)
@ -100,0 +168,4 @@
subscriptions := getUserSubscribedChats(m.Sender.Username)
if len(subscriptions) == 0 {
shared.Bot.Send(m.Chat, "Vous n'êtes abonnés à aucun chat")
-s if you're talking to the user :)
👍
@ -231,2 +306,4 @@
for _, sub := range chatList {
messages := getPublishedMessages(sub.ChatID)
if len(messages) > 0 {
hasMessage = true
Désolé de ma méconnaissance mais y'a pas un genre de ternaire pour éviter une grosse condition pour ça ?
Nope, c'est fait exprès dans le design du langage
@ -0,0 +16,4 @@
func RegisterPrivate(m *tb.Message) {
if m.Chat.Type != tb.ChatPrivate {
shared.Bot.Send(m.Chat, "Cette commande n'est disponnible qu'en messages privés")
disponible*
@ -0,0 +31,4 @@
func UnRegisterPrivate(m *tb.Message) {
if m.Chat.Type != tb.ChatPrivate {
shared.Bot.Send(m.Chat, "Cette commande n'est disponnible qu'en messages privés")
disponible*