Skip to content

Commit

Permalink
add start for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-streltsov committed Oct 20, 2024
1 parent 0b783dd commit 29020ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ func main() {

if isAdmin {
switch {
case text == "/start":
msg := tgbotapi.NewMessage(chatID, "Добро пожаловать, Вы - администратор. Используйте команды /see_queries и /answer для ответа на вопросы пользователей.")
bot.Send(msg)
case text == "/see_queries":
rows, err := db.Query("SELECT id, username, message FROM messages WHERE answered = 0")
if err != nil {
Expand Down

0 comments on commit 29020ef

Please sign in to comment.