Discord bot
PWF Auth's bot in your Discord server: customers claim keys, your staff manage them, a buyer role
PWF Auth's Discord bot works inside your own Discord server. Customers claim their key there, see the time left and move to a new PC with slash commands; your staff make and manage keys; and a buyer role can mark everyone who holds a valid key. You don't make a bot yourself: you add PWF Auth's bot to your server and link the server to one of your applications on the Discord bot page
Link a server
- On the Discord bot page pick the application (when you have more than one) and press Add the bot. Discord asks which server. The bot asks for Manage Roles, for the buyer role, and Send Messages with Embed Links, for the customer panel
- Press Get a link code. The code looks like ABCD-EFGH, works once and lasts 15 minutes
- In your server run /pwf link code:ABCD-EFGH. You need the Manage Server permission there. The server is linked and shows on the page
A server serves one application at a time; linking it again with a code of another app moves it (its buyer role and access rules start clean). One application can have several servers. Unlink on the page, or /pwf unlink in the server, disconnects it; keys and the keys customers claimed stay
What customers can do
- /redeem key:… claims a key for their Discord account (and gives the buyer role, when you set one). A key claimed by one account can't be claimed by another; ten wrong keys in ten minutes pause them for a while
- /mykeys: their keys, the status and the time left
- /resethwid key:…: frees the key for a new PC, by your app's own self-service rules (on or off, and how often; see HWID resets). Only the account that claimed a key can reset it here
Customers who don't want to type commands can use the buttons of the customer panel instead
Customer panel
A message the bot posts in one of your channels, in your own words, with three buttons. Customers press a button instead of remembering a command, and only they see the bot's answers
- Open the channel where customers should find it and run /pwf panel. You need Manage Server. Add color:#8B5CF6 to change the bar on the left (mint by default)
- A window opens with the title, the message and the names of the buttons. Write them in your customers' language; Discord markdown works. Leave My keys button empty to hide that button
- Send it: the bot posts the panel in that channel
| Button | Does |
|---|---|
| Redeem Key | A window for the key, then the same as /redeem: the key is claimed for their Discord account and the buyer role is given |
| Reset HWID | The keys they claimed, to pick one (or a window for a key they never claimed here), then the same as /resethwid, by your app's rules |
| My keys | The same as /mykeys: their keys and the time left |
Run /pwf panel again in the same channel to change the text: the bot edits the panel where it is. In another channel the panel moves there. Unlink removes it. The ten-wrong-keys pause counts the buttons too
Sell a role with one-time keys
When the role is what you sell, a key can work once: the buyer redeems it, gets the role and keeps it, and the key is used up. They can buy another key any time. This works with the keys you already make, of any length, from the panel, a reseller or a store
- Pick the role: /pwf buyer-role role:@VIP
- Turn it on: /pwf one-time on:True. You need Manage Server. on:False turns it off; keys already used stay used
- The moment the role is given, the key shows as Redeemed in Licenses. It can't sign in or be claimed again. If the bot could not give the role, the key stays as it was, so the buyer can try again once that is fixed
- The buyer keeps the role after the key is used, even if you delete the key. Only banning the key takes the role back, within the hour, and a refund from your store bans it too
- A buyer who left your server and came back gets the role again with the same key, in that server only
- A key that already signed in to your program is not used up: the role comes and goes with the key, as usual
Your staff
The /key commands need Manage Server by default. To hand them to a staff role, open Server Settings → Integrations → PWF Auth in Discord and allow /key for that role
| Command | Does |
|---|---|
| /key create days:30 count:5 devices:2 | Five 30-day keys for 2 PCs each, with an optional note (0 days = lifetime, up to 25 keys). Your app's key format is used |
| /key info key:… | Status, time left, devices, logins, who claimed it and the reseller who sold it |
| /key reset-hwid key:… | Unbinds every PC of the key |
| /key ban · /key unban | Same as in Licenses: banned keys are signed out |
| /key add-time · /key remove-time | Same rules as Add time in Licenses |
| /key delete key:… | Asks first, with buttons. A reseller who sold the key gets its credits back |
| /pwf stats · /pwf status | The app's keys and who is online; which app the server is linked to |
Everything staff do goes through the same code as the panel and shows in the key's activity with discord:name as who did it
Server managers
- /pwf panel: posts or changes the customer panel in the channel you run it in
- /pwf buyer-role role:@Buyers: customers get that role with /redeem, and lose it within the hour once the key expires, is banned or is deleted (unless another valid key of theirs still gives it). Keep the PWF Auth role above it in Server Settings → Roles. Run it without a role to turn it off
- /pwf one-time on:True: a key works once and the buyer keeps the role, see one-time keys
- /pwf access who:@Helpers: pick which /key commands a role or a member may use (for example only info and reset-hwid). Without who it lists every rule. Server managers can always use everything
Something missing or unclear? Tell us on Telegram