Add DefaultComment configuration option
This commit is contained in:
parent
44e0d55d9d
commit
e251b0ccda
|
@ -1,6 +1,9 @@
|
|||
MumbleDJ Changelog
|
||||
==================
|
||||
|
||||
### February 9, 2015 -- `v2.4.3`
|
||||
* Added configuration option in `mumbledj.gcfg` for default bot comment.
|
||||
|
||||
### February 7, 2015 -- `v2.4.2`
|
||||
* Updated `gumble` and `gumbleutil` dependencies.
|
||||
* Removed `sanitize` dependency.
|
||||
|
|
4
main.go
4
main.go
|
@ -8,7 +8,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"crypto/tls"
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/layeh/gopus"
|
||||
|
@ -59,6 +59,8 @@ func (dj *mumbledj) OnConnect(e *gumble.ConnectEvent) {
|
|||
}
|
||||
|
||||
dj.client.AudioEncoder().SetApplication(gopus.Audio)
|
||||
|
||||
dj.client.Self().SetComment(dj.conf.General.DefaultComment)
|
||||
}
|
||||
|
||||
// OnDisconnect event. Terminates MumbleDJ thread.
|
||||
|
|
|
@ -17,6 +17,11 @@ SkipRatio = 0.5
|
|||
# DEFAULT VALUE: 0.5
|
||||
PlaylistSkipRatio = 0.5
|
||||
|
||||
# Default comment to be applied to bot.
|
||||
# DEFAULT VALUE: "Hello! I am a bot. Type !help for a list of commands."
|
||||
# NOTE: If you do not want a comment by default, set the variable equal to an empty string ("").
|
||||
DefaultComment = "Hello! I am a bot. Type !help for a list of commands."
|
||||
|
||||
|
||||
[Volume]
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ type DjConfig struct {
|
|||
CommandPrefix string
|
||||
SkipRatio float32
|
||||
PlaylistSkipRatio float32
|
||||
DefaultComment string
|
||||
}
|
||||
Volume struct {
|
||||
DefaultVolume float32
|
||||
|
@ -39,7 +40,7 @@ type DjConfig struct {
|
|||
NumSongsAlias string
|
||||
NextSongAlias string
|
||||
CurrentSongAlias string
|
||||
SetCommentAlias string
|
||||
SetCommentAlias string
|
||||
KillAlias string
|
||||
}
|
||||
Permissions struct {
|
||||
|
@ -56,7 +57,7 @@ type DjConfig struct {
|
|||
AdminNumSongs bool
|
||||
AdminNextSong bool
|
||||
AdminCurrentSong bool
|
||||
AdminSetComment bool
|
||||
AdminSetComment bool
|
||||
AdminKill bool
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue