mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 01:12:33 -05:00
[V3 docs] Add a tutorial for Config and fix Bank docs (#959)
* [V3 docs] Add a tutorial for Config * fix missing colon * Add some links to the actual methods * Fix bank docs
This commit is contained in:
12
core/bank.py
12
core/bank.py
@@ -1,9 +1,8 @@
|
||||
import datetime
|
||||
from collections import namedtuple
|
||||
from typing import Tuple, Generator, Union, List
|
||||
from typing import Union, List
|
||||
import os
|
||||
|
||||
import discord
|
||||
from copy import deepcopy
|
||||
|
||||
from core import Config
|
||||
|
||||
@@ -36,8 +35,6 @@ _DEFAULT_USER = _DEFAULT_MEMBER
|
||||
|
||||
_bank_type = type("Bank", (object,), {})
|
||||
|
||||
_conf = Config.get_conf(_bank_type(), 384734293238749, force_registration=True)
|
||||
|
||||
|
||||
class Account:
|
||||
"""A single account. This class should ONLY be instantiated by the bank itself."""
|
||||
@@ -54,8 +51,9 @@ def _register_defaults():
|
||||
_conf.register_member(**_DEFAULT_MEMBER)
|
||||
_conf.register_user(**_DEFAULT_USER)
|
||||
|
||||
|
||||
_register_defaults()
|
||||
if not os.environ.get('BUILDING_DOCS'):
|
||||
_conf = Config.get_conf(_bank_type(), 384734293238749, force_registration=True)
|
||||
_register_defaults()
|
||||
|
||||
|
||||
def _encoded_current_time() -> int:
|
||||
|
||||
Reference in New Issue
Block a user