dev
This commit is contained in:
@@ -13,6 +13,7 @@ func RegisterAdmin(b *laniakea.Bot) {
|
||||
p := laniakea.NewPlugin("Admin")
|
||||
p.Command(uploadPhoto, "uploadPhoto")
|
||||
p.Command(emojiId, "emojiId")
|
||||
p.Command(getProxy, "proxy")
|
||||
p.Command(test, "test")
|
||||
|
||||
p.AddMiddleware(AdminMiddleware())
|
||||
@@ -33,6 +34,14 @@ func AdminMiddleware() *laniakea.PluginMiddleware {
|
||||
func test(ctx *laniakea.MsgContext, _ *laniakea.DatabaseContext) {
|
||||
ctx.Answer("Ok")
|
||||
}
|
||||
func getProxy(ctx *laniakea.MsgContext, _ *laniakea.DatabaseContext) {
|
||||
ruProxy := "tg://proxy?port=3128&secret=7qaZyfQN-IQ7ZMwrR_zWnHBvem9uLnJ1&server=185.231.245.25"
|
||||
fiProxy := "tg://proxy?port=3128&secret=7vmNtw_233xvIRFvImm2PLtvem9uLnJ1&server=46.243.6.125"
|
||||
kb := laniakea.NewInlineKeyboard(1)
|
||||
kb.AddUrlButtonStyle("🇷🇺Russia", laniakea.ButtonStylePrimary, ruProxy)
|
||||
kb.AddUrlButtonStyle("🇫🇮Finland", laniakea.ButtonStylePrimary, fiProxy)
|
||||
ctx.Keyboard("Доступные прокси", kb)
|
||||
}
|
||||
func emojiId(ctx *laniakea.MsgContext, _ *laniakea.DatabaseContext) {
|
||||
var id string
|
||||
for _, e := range ctx.Msg.Entities {
|
||||
|
||||
Reference in New Issue
Block a user