Add command to get logging channel
This commit is contained in:
parent
df4f94d799
commit
df3af0ccc6
@ -49,7 +49,7 @@ func loggingChannel(ctx disgoman.Context, args []string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func getLoggingCommand(ctx disgoman.Context, _ []string) error {
|
func getLoggingChannel(ctx disgoman.Context, _ []string) error {
|
||||||
var channelID string
|
var channelID string
|
||||||
row := utils.Database.QueryRow("SELECT logging_channel FROM guilds where id=$1", ctx.Guild.ID)
|
row := utils.Database.QueryRow("SELECT logging_channel FROM guilds where id=$1", ctx.Guild.ID)
|
||||||
err := row.Scan(channelID)
|
err := row.Scan(channelID)
|
||||||
|
|||||||
@ -94,4 +94,13 @@ func AddCommandHandlers(h *disgoman.CommandManager) {
|
|||||||
RequiredPermissions: disgoman.PermissionManageServer,
|
RequiredPermissions: disgoman.PermissionManageServer,
|
||||||
Invoke: loggingChannel,
|
Invoke: loggingChannel,
|
||||||
})
|
})
|
||||||
|
h.AddCommand(&disgoman.Command{
|
||||||
|
Name: "get-logging-channel",
|
||||||
|
Aliases: []string{"glc"},
|
||||||
|
Description: "Gets the channel logging messages will be sent to.",
|
||||||
|
OwnerOnly: false,
|
||||||
|
Hidden: false,
|
||||||
|
RequiredPermissions: disgoman.PermissionManageServer,
|
||||||
|
Invoke: getLoggingChannel,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user