Taho Global

THe following section outlines the module Taho. This doesn’t include taho’s submodules (database, babel…).

ABC

Shortcutable

class taho.abc.Shortcutable[source]

A base class for shortcutables.

StuffShortcutable

class taho.abc.StuffShortcutable[source]

An ABC that brings together all the models that can be pointed by a StuffShortcut.

See Shortcuts for more information.

The following classes implement this ABC:

  • Item

  • Stat

  • Currency

  • Role

  • Inventory

OwnerShortcutable

class taho.abc.OwnerShortcutable[source]

An ABC that brings together all the models that can be pointed by a OwnerShortcut.

See Shortcuts for more information.

The following classes implement this ABC:

  • User

AccessRuleShortcutable

class taho.abc.AccessRuleShortcutable[source]

An ABC that brings together all the models that can be pointed by a AccessRuleShortcut.

See Shortcuts for more information.

The following classes implement this ABC:

  • User

  • Role

TradeStuffShortcutable

class taho.abc.TradeStuffShortcutable[source]

An ABC that brings together all the models that can be pointed by a TradeStuffShortcut.

See Shortcuts for more information.

The following classes implement this ABC:

  • CurrencyAmount

  • Inventory

Enums

InfoType

class taho.enums.InfoType[source]

This is an Integer enum.

The python’s type of an info stored in the database. Used for ClusterInfo, BankInfo and ServerInfo

NULL

The info is a None value.

BOOl

The info is a bool value.

INT

The info is a int value.

FLOAT

The info is a float value.

STR

The info is a str value.

ChannelType

class taho.enums.ChannelType

This is an Integer enum.

The type of a ServerChannel.

roleplay

The channel is a roleplay channel.

other

The channel has no special type.

ItemType

class taho.enums.ItemType

This is an Integer enum.

The type of an Item.

resource

The item is a resource.

consumable

The item is a consumable.

currency

The item is a currency. It’s used to represent the currency as cash in users inventories.

ItemReason

class taho.enums.ItemReason

This is an Integer enum.

The reason why a Role / Stat linked to an Item is added to the User.

item_used

The item has been used.

item_equiped

The item has been equiped (in the hotbar).

item_in_inventory

The item has been added to the inventory or is already in the inventory.

ItemUse

class taho.enums.ItemUse

This is an Integer enum.

When an Item is used, precises the type of use.

use

The item is just used.

equip

The item is equiped in the hotbar.

unequip

The item is unequiped from the hotbar.

give

The item is given to the user.

RewardType

class taho.enums.RewardType

This is an Integer enum.

The type of a ItemReward.

passive

The reward is a passive reward.

active

The reward is an active reward.

equip

The reward is an equip reward. It’s added when the item is equiped to the hotbar.

SalaryCondition

class taho.enums.SalaryCondition

This is an Integer enum.

The condition to be met for the salary of a Job to be paid.

no_salary

No salary is paid.

every_day

The salary is paid every day.

every_day_if_worked

The salary is paid every day if the user worked.

every_week

The salary is paid every week.

every_week_if_worked

The salary is paid every week if the user worked.

RewardType

class taho.enums.RewardType

This is an Integer enum.

The type of JobReward given by a Job. This enum is also used for JobCost.

money

The reward is money.

item

The reward is an item.

stat

The reward is a stat.

RoleType

class taho.enums.RoleType

This is an Integer enum.

The type of a Role.

default

The role is the default rp role.

job

The role is linked to a job.

class_

The role is linked to a class.

other

The role is not linked to any system of the bot, but it is still a rp role.

RoleAddedBy

class taho.enums.RoleAddedBy

This is an Integer enum.

By what a UserRole was added to a User.

admin

The role was added intentionally by a Discord admin or with a command.

item

The role was added due to the presence of an item in the inventory.

shop

The role was added because of a shop purchase.

other

The role is added by an unknown source.

RegenerationType

class taho.enums.RegenerationType

This is an Integer enum.

The type of regeneration of a Stat.

no_regeneration

The stat can’t be regenerated.

no_regen

Same as no_regeneration.

regeneration

The stat is regenerated naturally.

regen

Same as regeneration.

not_natural_regeneration

The stat is regenerated, but not naturally.

not_natural_regen

Same as not_natural_regeneration.

RPEffect

class taho.enums.RPEffect

This is an Integer enum.

The effect in the roleplay of a Stat.

no_effect

The stat has no effect in the roleplay.

hp

The stat is the hp of the user.

stamina

The stat is the stamina of the user.

strength

The stat is the strength of the user.

protection

The stat is the protection of the user.

speed

The stat is the speed of the user.

agility

The stat is the agility of the user.

ability

The stat is the ability of the user.

ShortcutableType

class taho.enums.ShortcutableType

This is an Integer enum.

The type of a Shortcut.

item

This shortcut goes to an Item.

stat

This shortcut goes to a Stat.

currency

This shortcut goes to a Currency.

role

This shortcut goes to a Role.

user

This shortcut goes to a User.

inventory

This shortcut goes to a Inventory.

currency_amount

This shortcut goes to a CurrencyAmount.

CraftAccessRuleType

class taho.enums.CraftAccessRuleType

This is an Integer enum.

The type of entity which have (or not) access to a Craft.

user

The access is for a user.

role

The access is for a role.

ShopType

class taho.enums.ShopType

This is an Integer enum.

The type of a Shop.

user

The shop is a personnal shop of a User.

admin

The shop is created by a Server admin (the shop can have unlimited amounts).

shared

The shop is shared between all users.