Improve documentation and fix typos
MODIFY
commands/commandimpls/account.go
commands/commandimpls/account.go
@@ -19,11 +19,11 @@ cordless.
Subcommands:
* add - Adds a new account
* delete - Deletes the given account
- * switch - Allows you to switch your active account
+ * switch - Allows you to switch accounts
* list - Lists all available accounts
- * current - Displays the currently used account
- * add-current - Add the token currently in use as a new account
- * logout - Resets the token, which will cause cordless to prompt you for credentials again
+ * current - Displays the current account
+ * add-current - Adds the currently logged in token as a new account
+ * logout - Logs out of the current account logged into cordless
`
// Account manages the users account
@@ -216,7 +216,7 @@ func (account *Account) currentAccount(writer io.Writer) {
if currentAccount != nil {
fmt.Fprintf(writer, "Current account '%s'.\n", currentAccount.Name)
} else {
- fmt.Fprintln(writer, "Current token belongs to no saved account.")
+ fmt.Fprintln(writer, "You have not saved an account with this token.")
}
}

MODIFY
commands/commandimpls/friends.go
commands/commandimpls/friends.go
@@ -13,16 +13,16 @@ import (
const friendsDocumentation = `[orange][::u]# friends[white]
The friends command allows you to manage your friends on discord. You can add
-new friends by sending or accepting friendsrequests. You can also see your
-current requests, that goes for the incomming and the outgoing ones.
+new friends by sending or accepting friend-requests. You can also see your
+current requests, that goes for the incoming and the outgoing ones.
The friend currently command offers the following subcommands:
- * accept - accept a friends-request
- * befriend - send a friends-request
+ * accept - accept a friend-request
+ * befriend - send a friend-request
* requests - shows all current requests
* search - finds friends by name, name#discriminator or id
* list - shows all friends
- * remove - removes a friend from your friendslist
+ * remove - removes a friend from your friend-list
The following features are currently unsupported:
* Blocking users
@@ -107,11 +107,11 @@ func (f *Friends) Execute(writer io.Writer, parameters []string) {
}
}
- fmt.Fprintln(writer, "Incomming requests:")
+ fmt.Fprintln(writer, "Incoming requests:")
if incomming != "" {
fmt.Fprintln(writer, incomming)
} else {
- fmt.Fprintln(writer, "No incomming requests.")
+ fmt.Fprintln(writer, "No incoming requests.")
}
fmt.Fprintln(writer, "Outgoing requests:")
@@ -138,10 +138,10 @@ func (f *Friends) Execute(writer io.Writer, parameters []string) {
if len(matches) == 0 {
fmt.Fprintf(writer, "No matches for '%s' found.\n", input)
} else if len(matches) == 1 {
- fmt.Fprintln(writer, "Accepting friends request of "+matches[0].User.String())
+ fmt.Fprintln(writer, "Accepting friend request of "+matches[0].User.String())
acceptErr := f.session.RelationshipFriendRequestAccept(matches[0].User.ID)
if acceptErr != nil {
- fmt.Fprintf(writer, "Error accepting friendsrequest (%s).\n", acceptErr.Error())
+ fmt.Fprintf(writer, "Error accepting friend-request (%s).\n", acceptErr.Error())
} else {
fmt.Fprintln(writer, matches[0].User.String()+" is now your friend.")
}
@@ -211,11 +211,11 @@ func (f *Friends) Execute(writer io.Writer, parameters []string) {
discriminator, _ := strconv.ParseInt(parts[1], 10, 32)
requestError := f.session.RelationshipFriendRequestSendByNameAndDiscriminator(parts[0], int(discriminator))
if requestError != nil {
- fmt.Fprintf(writer, "Error sending friendsrequest to '%s'.\n\t%s\n", input, requestError.Error())
+ fmt.Fprintf(writer, "Error sending friend-request to '%s'.\n\t%s\n", input, requestError.Error())
return
}
- fmt.Fprintf(writer, "A friends-request has been sent to '%s'.\n", input)
+ fmt.Fprintf(writer, "A friend-request has been sent to '%s'.\n", input)
return
}
@@ -231,16 +231,16 @@ func (f *Friends) Execute(writer io.Writer, parameters []string) {
if requestError != nil {
fmt.Fprintf(writer, "Error sending friends-request (%s).\n", requestError)
} else {
- fmt.Fprintln(writer, "Friends-request has been sent.")
+ fmt.Fprintln(writer, "Friend-request has been sent.")
}
} else if len(matches) == 1 {
user := matches[0]
requestError := f.session.RelationshipFriendRequestSend(user.ID)
if requestError != nil {
- fmt.Fprintf(writer, "Error sending friends-request (%s).\n", requestError)
+ fmt.Fprintf(writer, "Error sending friend-request (%s).\n", requestError)
} else {
- fmt.Fprintf(writer, "A friends-request has been sent to '%s'.\n", user.String())
+ fmt.Fprintf(writer, "A friend-request has been sent to '%s'.\n", user.String())
}
} else {
fmt.Fprintf(writer, "Multiple matches were found for '%s'. Please be more precise.\n", input)

MODIFY
commands/commandimpls/manual.go
commands/commandimpls/manual.go
@@ -136,7 +136,7 @@ const commandsDocumentation = `[::b]TOPIC
command may have zero or more subcommands and zero or more settings.
There may also be settings that do not require you passing a value.
If a value contains spaces it needs to be quoted beforehand, otherwise
- the input will be seperated at each given space. Some commands require
+ the input will be separated at each given space. Some commands require
some main value, which is basically the non-optional input for that
command. That value doesn't require a setting-name to be prepended in
front of it.

MODIFY
commands/commandimpls/user.go
commands/commandimpls/user.go
@@ -52,7 +52,7 @@ const (
[::b]-n, --name
change your nickname
[::b]-e, --email
- change the e-mail address asociated with your account
+ change the e-mail address associated with your account
[::b]-a, --avatar
change your avatar to a new local file of yours
[::b]-p, --np

MODIFY
config/config.go
config/config.go
@@ -89,7 +89,7 @@ type Config struct {
// OnTypeInListBehaviour defines whether the application focus the input
// input field on typing, searches the list or does nothing.
OnTypeInListBehaviour int
- // MouseEnabled decides whether the mouse is useable or not.
+ // MouseEnabled decides whether the mouse is usable or not.
MouseEnabled bool
// ShortenLinks decides whether cordless starts a local webserver in order

MODIFY
ui/login.go
ui/login.go
@@ -71,7 +71,7 @@ func NewLogin(app *tview.Application, configDir string) *Login {
tokenInputMasked: true,
tokenInputMaskRune: '*',
loginTypeTokenButton: tview.NewButton("Login via Authentication-Token"),
- loginTypePasswordButton: tview.NewButton("Login via E-Mail and password (Optinally Supports 2FA)"),
+ loginTypePasswordButton: tview.NewButton("Login via E-Mail and password (Optionally Supports 2FA)"),
messageText: tview.NewTextView(),
}
@@ -319,7 +319,7 @@ func (login *Login) RequestLogin(additionalMessage string) (*discordgo.Session,
func (login *Login) showLoginTypeChoice() {
login.showView(login.loginChoiceView, 5)
login.app.SetFocus(login.loginTypeTokenButton)
- login.messageText.SetText("Please decide for a login method.\n\nLogging in as a Bot will only work using a Authentication-Token.")
+ login.messageText.SetText("Please choose a login method.\n\nLogging in as a Bot will only work using a Authentication-Token.")
}
func (login *Login) showPasswordLogin() {

Improve documentation and fix typos