modules/config: Move roles and token into config file
							parent
							
								
									c73d28cc79
								
							
						
					
					
						commit
						801f9f8d6f
					
				@ -1,4 +1,2 @@
 | 
			
		||||
token.txt
 | 
			
		||||
roles.txt
 | 
			
		||||
bot.db
 | 
			
		||||
config.json
 | 
			
		||||
 | 
			
		||||
@ -1,16 +0,0 @@
 | 
			
		||||
package roles
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"io/ioutil"
 | 
			
		||||
	"strings"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var rolesFromLevel []string
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
	listOfRoles, _ := ioutil.ReadFile("roles.txt")
 | 
			
		||||
	rolesFromLevel = strings.Split(string(listOfRoles), "\n")
 | 
			
		||||
	for k, v := range rolesFromLevel {
 | 
			
		||||
		rolesFromLevel[k] = strings.TrimSpace(v)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue