Documentation ¶
Index ¶
- func AlterUsersCurrency(ds *discordgo.Session, mc *discordgo.Message, ctx *framework.Context, ...)
- func AwardCurrency(ds *discordgo.Session, mc *discordgo.Message, ctx *framework.Context)
- func ChangeValue(db *sql.DB, currencyDelta int, targetUserID string)
- func CheckForCurrency(db *sql.DB, targetUserID string) (int, error)
- func GiveCurrency(ds *discordgo.Session, mc *discordgo.Message, ctx *framework.Context)
- func ListUserWallet(ds *discordgo.Session, mc *discordgo.Message, ctx *framework.Context)
- func ShowLeaderBoard(ds *discordgo.Session, mc *discordgo.Message, ctx *framework.Context)
- func TakeCurrency(ds *discordgo.Session, mc *discordgo.Message, ctx *framework.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlterUsersCurrency ¶
func AlterUsersCurrency(ds *discordgo.Session, mc *discordgo.Message, ctx *framework.Context, multiplier float64)
AlterUsersCurrency will parse through ds, and mc to get a value from the message and then make a change to the mentioned user. The value will be multiplied with the multipier to allow both positive and negative changes.
func AwardCurrency ¶
AwardCurrency will create a given amount of currency and give it to the user mentioned Should only be used by Bot admins
func ChangeValue ¶
ChangeValue will alter the targetUserID's wallet by currencyDelta on the database pointed to by db
func CheckForCurrency ¶
CheckForCurrency will query the database and return the value of the targetUserID's wallet If that user is not in the database they will be added and given the starting amount of currency
func GiveCurrency ¶
GiveCurrency will give a given amount of currency from the author of the message to the user who is mentioned. TODO Read the transaction value from message
func ListUserWallet ¶
ListUserWallet will list the current value of the users wallet.h
func ShowLeaderBoard ¶
ShowLeaderBoard will display the leaderboard in chat *lb <page>
Types ¶
This section is empty.