mirror of
https://github.com/AynaLivePlayer/AynaLivePlayer.git
synced 2025-12-06 18:32:50 +08:00
add qiege logging. update dependency
This commit is contained in:
Submodule pkg/miaosic updated: 4b54a301c9...4e77cdfd0e
@@ -8,6 +8,7 @@ import (
|
|||||||
"AynaLivePlayer/pkg/config"
|
"AynaLivePlayer/pkg/config"
|
||||||
"AynaLivePlayer/pkg/event"
|
"AynaLivePlayer/pkg/event"
|
||||||
"AynaLivePlayer/pkg/i18n"
|
"AynaLivePlayer/pkg/i18n"
|
||||||
|
"AynaLivePlayer/pkg/logger"
|
||||||
"fyne.io/fyne/v2"
|
"fyne.io/fyne/v2"
|
||||||
"fyne.io/fyne/v2/container"
|
"fyne.io/fyne/v2/container"
|
||||||
"fyne.io/fyne/v2/data/binding"
|
"fyne.io/fyne/v2/data/binding"
|
||||||
@@ -23,6 +24,7 @@ type Qiege struct {
|
|||||||
CustomCMD string
|
CustomCMD string
|
||||||
currentUid string
|
currentUid string
|
||||||
panel fyne.CanvasObject
|
panel fyne.CanvasObject
|
||||||
|
log logger.ILogger
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewQiege() *Qiege {
|
func NewQiege() *Qiege {
|
||||||
@@ -31,6 +33,7 @@ func NewQiege() *Qiege {
|
|||||||
PrivilegePermission: true,
|
PrivilegePermission: true,
|
||||||
AdminPermission: true,
|
AdminPermission: true,
|
||||||
CustomCMD: "切歌",
|
CustomCMD: "切歌",
|
||||||
|
log: global.Logger.WithPrefix("plugin.qiege"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,6 +74,7 @@ func (d *Qiege) handleMessage(event *event.Event) {
|
|||||||
if len(msgs) < 1 || msgs[0] != d.CustomCMD {
|
if len(msgs) < 1 || msgs[0] != d.CustomCMD {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
d.log.Infof("recieve diange command")
|
||||||
if d.UserPermission {
|
if d.UserPermission {
|
||||||
if d.currentUid == message.User.Uid {
|
if d.currentUid == message.User.Uid {
|
||||||
global.EventManager.CallA(
|
global.EventManager.CallA(
|
||||||
|
|||||||
Reference in New Issue
Block a user