commit
This commit is contained in:
@@ -17,7 +17,6 @@ func RegisterAdmin() *laniakea.Plugin[database.Context] {
|
||||
p := laniakea.NewPlugin[database.Context]("Admin")
|
||||
p.AddCommand(laniakea.NewCommand(uploadPhoto, "uploadPhoto").SkipCommandAutoGen())
|
||||
p.AddCommand(laniakea.NewCommand(emojiId, "emojiId").SkipCommandAutoGen())
|
||||
p.AddCommand(laniakea.NewCommand(getProxy, "proxy").SkipCommandAutoGen())
|
||||
p.AddCommand(laniakea.NewCommand(execSql, "sql").SkipCommandAutoGen())
|
||||
|
||||
p.AddMiddleware(AdminMiddleware())
|
||||
@@ -62,14 +61,7 @@ func execSql(ctx *laniakea.MsgContext, db *database.Context) {
|
||||
}
|
||||
ctx.Answerf("`%s`", data)
|
||||
}
|
||||
func getProxy(ctx *laniakea.MsgContext, _ *database.Context) {
|
||||
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, _ *database.Context) {
|
||||
var id string
|
||||
for _, e := range ctx.Msg.Entities {
|
||||
|
||||
Reference in New Issue
Block a user