forked from git.klmp200.net/ALFRED
Externalized all commands in corresponding package
This commit is contained in:
parent
f7f3308372
commit
7336770332
5 changed files with 80 additions and 18 deletions
17
commands/framapad.go
Normal file
17
commands/framapad.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* @Author: Bartuccio Antoine
|
||||
* @Date: 2018-07-24 12:11:26
|
||||
* @Last Modified by: klmp200
|
||||
* @Last Modified time: 2018-07-24 12:12:58
|
||||
*/
|
||||
|
||||
package commands
|
||||
|
||||
import (
|
||||
"../shared"
|
||||
tb "gopkg.in/tucnak/telebot.v2"
|
||||
)
|
||||
|
||||
func Framapad(m *tb.Message) {
|
||||
shared.Bot.Send(m.Chat, "Venez participer à mon développement en posant vos idées ici : https://mensuel.framapad.org/p/ALFRED2LERETOUR.")
|
||||
}
|
17
commands/git.go
Normal file
17
commands/git.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* @Author: Bartuccio Antoine
|
||||
* @Date: 2018-07-24 12:07:34
|
||||
* @Last Modified by: klmp200
|
||||
* @Last Modified time: 2018-07-24 12:08:49
|
||||
*/
|
||||
|
||||
package commands
|
||||
|
||||
import (
|
||||
"../shared"
|
||||
tb "gopkg.in/tucnak/telebot.v2"
|
||||
)
|
||||
|
||||
func Git(m *tb.Message) {
|
||||
shared.Bot.Send(m.Chat, "Mon code source est accessible librement à l'adresse https://git.klmp200.net/ALFRED/ALFRED. Venez contribuer :)")
|
||||
}
|
17
commands/hello.go
Normal file
17
commands/hello.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* @Author: Bartuccio Antoine
|
||||
* @Date: 2018-07-24 12:05:45
|
||||
* @Last Modified by: klmp200
|
||||
* @Last Modified time: 2018-07-24 12:06:39
|
||||
*/
|
||||
|
||||
package commands
|
||||
|
||||
import (
|
||||
"../shared"
|
||||
tb "gopkg.in/tucnak/telebot.v2"
|
||||
)
|
||||
|
||||
func Hello(m *tb.Message) {
|
||||
shared.Bot.Send(m.Chat, "Bonjour "+m.Sender.Username)
|
||||
}
|
17
commands/on_text.go
Normal file
17
commands/on_text.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* @Author: Bartuccio Antoine
|
||||
* @Date: 2018-07-24 12:09:37
|
||||
* @Last Modified by: klmp200
|
||||
* @Last Modified time: 2018-07-24 12:10:26
|
||||
*/
|
||||
|
||||
package commands
|
||||
|
||||
import (
|
||||
"../shared"
|
||||
tb "gopkg.in/tucnak/telebot.v2"
|
||||
)
|
||||
|
||||
func OnText(m *tb.Message) {
|
||||
shared.History.AddMessage(m.Chat.ID, m.Text)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue