@@ -29,8 +29,8 @@ type KeybindingsConfig struct {
}
type Config struct {
- General GeneralConfig `json:"general"`
Keybindings KeybindingsConfig `json:"keybindings"`
+ General GeneralConfig `json:"general"`
func New() *Config {
@@ -12,16 +12,14 @@ import (
type App struct {
*tview.Application
-
GuildsList *tview.List
ChannelsTreeView *tview.TreeView
MessagesTextView *tview.TextView
MessageInputField *tview.InputField
- Session *discordgo.Session
- SelectedChannel *discordgo.Channel
- SelectedMessage int
- Config config.Config
+ Session *discordgo.Session
+ SelectedChannel *discordgo.Channel
+ Config config.Config
+ SelectedMessage int
func NewApp() *App {
@@ -58,10 +58,10 @@ func HasPermission(s *discordgo.State, cID string, p int64) bool {
type loginResponse struct {
- MFA bool `json:"mfa"`
- SMS bool `json:"sms"`
Ticket string `json:"ticket"`
Token string `json:"token"`
+ MFA bool `json:"mfa"`
+ SMS bool `json:"sms"`
func Login(s *discordgo.Session, email string, password string) (*loginResponse, error) {