Control Commands

class ControlCommands[source]

Commands that help in controlling PokeGambler.

Note

Only the Owners have access to these commands.

cmd_activity_trend()[source]

Activity Trend command

Parameters

message (discord.Message) – The message which triggered this command.

Syntax

/activity_trend

Description

👑 Owner Command Tester command for the activity trend.

Examples

  • To check the activity trend:

/activity_trend
cmd_command_history()[source]
Parameters
  • message (discord.Message) – The message which triggered this command.

  • limit (Optional[int]) – The number of commands to show.

  • user (Optional[discord.Member]) – The user to show commands for.

  • admin_cmd (Optional[bool]) – Whether or not to show admin commands.

Syntax

/command_history [limit:number] [user:@User] [admin_cmd:True/False]

Description

👑 Owner Command Retrieves the latest command history based on provided kwargs. Defaults to a limit of 5 commands. Filter must be comma-separated key value pairs of format key:value.

Examples

  • To retrieve the 10 latest commands

/cmd_hist limit:10
  • To retrieve latest commands used by admins

/cmd_hist admin_cmd:True

Aliases

cmd_hist

Parameter Config

Limit

Default

Min_Value

Max_Value

5

1

50

User

Default

None

Admin_Cmd

Default

None

cmd_export_items()[source]
Parameters
  • message (discord.Message) – The message which triggered this command.

  • pretty (Optional[int]) – The number of spaces to indent the JSON.

Syntax

/export_items [pretty:level]

Description

👑 Owner Command Exports the dynamicall_y created items from the database as JSON. The JSON is uploaded as a file in the channel. The pretty option can be used to provide indentation level.

Examples

  • To export the items as a JSON file

/export_items
  • To see a pretty version of items JSON file

/export_items pretty:3

Parameter Config

Pretty

Default

Min_Value

Max_Value

3

1

4

cmd_import_items()[source]
Parameters

Syntax

/import_items

Description

👑 Owner Command Waits for JSON file attachment and loads the data into the Items collection.

Warning

Do not import Rewardbox using this.

cmd_latest()[source]
Parameters
  • message (discord.Message) – The message which triggered this command.

  • limit (Optional[int]) – The number of documents to show.

Syntax

/latest [limit:number]

Description

👑 Owner Command Retrieves the latest documents from a Collection. Defaults to a limit of 5 documents.

Parameter Config

Limit

Default

Min_Value

Max_Value

5

1

50

cmd_purge_tables()[source]
Parameters
  • message (discord.Message) – The message which triggered this command.

  • all (Optional[bool]) – Whether to purge all tables.

  • all_ (Optional[bool]) –

Syntax

/purge_tables [all_:True/False]

Description

👑 Owner Command Purges the tables in the database.

Examples

  • To choose a table to purge

/purge_tables
  • To purge all the tables

/purge_tables all_:True

Aliases

prg_tbl

Parameter Config

All_

Default

False

cmd_reload()[source]
Parameters
  • message (discord.Message) – The message which triggered this command.

  • module (str) – The module to reload.

Syntax

/reload module:name

Description

👑 Owner Command Hot reloads a command module without having to restart.

Examples

  • To reload the Normalcommands module

/reload module:normal

Parameter Config

Module

Choices

[Profile, Admin, Normal, Trade, Gamble, Duel, Control]

cmd_timeit()[source]
Parameters
  • message (discord.Message) – The message which triggered this command.

  • command (str) – The command to time.

Syntax

/timeit command:name

Description

👑 Owner Command A utility commands that is used for timing other commands.

Examples

  • To time the leaderboard command

/timeit command:leaderboard