Add command to get logging channel

pull/1/head
DustyP 6 years ago
parent df4f94d799
commit df3af0ccc6

@ -49,7 +49,7 @@ func loggingChannel(ctx disgoman.Context, args []string) error {
return nil
}
func getLoggingCommand(ctx disgoman.Context, _ []string) error {
func getLoggingChannel(ctx disgoman.Context, _ []string) error {
var channelID string
row := utils.Database.QueryRow("SELECT logging_channel FROM guilds where id=$1", ctx.Guild.ID)
err := row.Scan(channelID)

@ -94,4 +94,13 @@ func AddCommandHandlers(h *disgoman.CommandManager) {
RequiredPermissions: disgoman.PermissionManageServer,
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…
Cancel
Save