From db421c828b7ae9f4ddd2f8fdfa89d191fe4d31df Mon Sep 17 00:00:00 2001 From: Amalvy Arthur Date: Mon, 31 Dec 2018 16:50:19 +0100 Subject: [PATCH] Codu quality patch in order to get merged with master --- alfred.go | 1 - commands/.#subscribe.go | 1 - commands/subscribe.go | 6 +++--- shared/users.go | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) delete mode 120000 commands/.#subscribe.go diff --git a/alfred.go b/alfred.go index 383d165..be6af5b 100644 --- a/alfred.go +++ b/alfred.go @@ -67,7 +67,6 @@ func main() { b.Handle(key, value) } - log.Println("token : " + settings.Settings["token"].(string)) log.Println("Starting bot") b.Start() } diff --git a/commands/.#subscribe.go b/commands/.#subscribe.go deleted file mode 120000 index a0892a2..0000000 --- a/commands/.#subscribe.go +++ /dev/null @@ -1 +0,0 @@ -aethor@pc60.home.13981:1546264820 \ No newline at end of file diff --git a/commands/subscribe.go b/commands/subscribe.go index 25a92ad..d0ac26c 100644 --- a/commands/subscribe.go +++ b/commands/subscribe.go @@ -70,7 +70,7 @@ func Unsubscribe(m *tb.Message) { shared.Users.Set(m.Sender.Username, "subscribed_chats", strings.Join(splittedChats, ":")) } -// List all subscribers of the current chat +// ListSubscribers List all subscribers of the current chat // Command syntax : /listsubscribers func ListSubscribers(m *tb.Message) { if m.Chat.Type != "group" && m.Chat.Type != "supergroup" { @@ -104,7 +104,7 @@ func Publish(m *tb.Message) { } -// Remove a message from published messages in the current chat +// Unpublish remove a message from published messages in the current chat // Command syntax : /unpublish [publication ID] func Unpublish(m *tb.Message) { parsedCommand := strings.Split(m.Text, " ") @@ -131,7 +131,7 @@ func Unpublish(m *tb.Message) { shared.Bot.Send(m.Chat, "Message supprimé des publication") } -// If performed in MP : retrieve all messages from all subscribed sources for the user +// Retrieve If performed in MP : retrieve all messages from all subscribed sources for the user // If performed in Group Chat : retrieved all published messages for this chat // Command syntax : /retrieve func Retrieve(m *tb.Message) { diff --git a/shared/users.go b/shared/users.go index 1105819..7eb47a2 100644 --- a/shared/users.go +++ b/shared/users.go @@ -61,7 +61,7 @@ func (u users) Set(username string, key, data string) { go uf.write() } -// Get all known usernames +// GetUsernames all usernames stored in settings func (u users) GetUsernames() []string { u.mutex.Lock() defer u.mutex.Unlock()