[Discord Only] CConomy | An in-development Discord Economy expansion [v3.0.0+]

#1

Hey there,

As a fun project, I have started working on a full expansion to the Discord Economy system. I’ll be releasing this project in small parts under the CConomy name. The rules of thumb I’m following is that everything in CConomy will cause as little spam as possible.

I’ll be trying to delete messages as much as possible, re-using messages where I can, and in general keep your discord as spam free as possible.

Note: Due to features from 3.0.0, this module now only works on 3.0.0+

Current version

0.0.2.1 (Early development and testing)

Current Features

Payday

A configurable points payout. You can set the interval in seconds, and the amount of points people get.

Payday Usage

!payday - Receive a payday
!payday setpoints [points] - Set the amount of points a user gets per !payday (Default: 100)
!payday setinterval [seconds] - Set the interval in seconds between when users can use !payday (Default: 86400)

Double or Nothing

A configurable betting module. A user can bet their points to win either double, or nothing. If they win double, they can keep doubling until they either cash out, or lose. The user only needs to run a single command for this, the rest is based on reactions.

!double [points] - Bet currency with a chance to win double
!double setminimum [points] - Set the minimum amount of points a user needs to bet (Default: 5)
!double setmaximum [points] - Set the maximum amount of points a user is allowed to bet (Default: 100)
!double setwinpercentage [number] - Set the win percentage (Default: 50%)

Planned Features

Games where you can spend and earn points

I have no exact plans yet of what these will be, but you can at least expect several casino type games.

Shop Function

The idea behind the shop function is to have a place for your users to spend their points from discord. What you can get in the store will range from buying roles on discord, to triggering alerts on stream. I’m looking into all the options for this.

Complete Panel Integration

When the new panel is completely released, I plan to make sure all of these features can be completely configured from the panel.

Download

CConomy 0.0.2.1.zip (8.1 KB)

Changelog

0.0.1
Initial Release

0.0.1.1
Bugfixes (Thanks @Dakoda)

0.0.2
Some minor edits to payday.
Language file additions
Added Double or Nothing

0.0.2.1
Updated scripts to use new 3.0 features:

  • The users command message will now be deleted.
  • Reactions now use the request buffer so they don’t get rate limited.
    Now only supports 3.0.0+

Installation Instruction

  1. Make sure PhantomBot is turned off.
  2. Download the zip file above.
  3. Unzip the file
  4. Drag and drop the scripts folder into the PhantomBot folder (This should put all the files in the correct locations.)
  5. Start the bot, and enjoy!

Update Instruction

  1. Make sure PhantomBot is turned off.
  2. Download the zip file above.
  3. Unzip the file
  4. Drag and drop the scripts folder into the PhantomBot folder (This should put all the files in the correct locations.)
  5. Allow the overwrite of files
  6. Start the bot, and enjoy!

(Every script uses the same language files, you need all of them)

Screenshots

image

image

2 Likes

pinned #2
0 Likes

#3

Updated with some bugfixes. Version bumped to 0.0.1.1.

0 Likes

#4

Did some minor fixes to Payday, and added Double or Nothing.

Version bumped to 0.0.2.

0 Likes

#5

Updated Payday & Double or Nothing with features only available in 3.0:

Command message from user will now auto-delete.
Reactions are now added in a way to avoid the rate limit.

Version bumped to 0.0.2.1

1 Like

#6

I want to change the react emotes how can I do that?

0 Likes

#7

I see at lines 156 and 157 of doubleOrNothing.js where the emoji is.

$.discordAPI.addReaction(message, doubleEmoji); $.discordAPI.addReaction(message, cashEmoji);

I’m not sure if you could just swap them out no problem or not. Might need to test it out!

0 Likes

#8

Well i couldn’t change the minimum and stuff like that in just the script file which its set to a command to be able to be changed so idk XD

0 Likes

#9

I’ll add a command as soon as I have time to be able to change it.

If you want to change it right now, you can edit line 154 and 155:

var doubleEmoji = ReactionEmoji.of('🇩');
var cashEmoji = ReactionEmoji.of('💰');

Though they will only accept unicode emoji that are in discord by default.

1 Like