feat: Add bank and wallet balance commands with improved transfer validation

- Added /bank and /wallet commands to check user balances
- Enhanced transfer validation to check for valid number input
- Included debug token logging in main function (to be removed in production)
- Added account creation logic for new users in balance commands
- Improved error handling for invalid transfer amounts
This commit is contained in:
2026-06-03 11:56:09 +00:00
parent 4b07ca86b9
commit b315069b1c
4 changed files with 168 additions and 84 deletions
+12 -8
View File
@@ -42,14 +42,18 @@ class Client(commands.Bot):
print("Loaded cogs")
def main():
load_dotenv()
initialize_database()
client = Client()
token = os.getenv("DISCORD_TOKEN") or os.getenv("TOKEN")
if not token:
raise SystemExit("ERROR: Discord token not found. Set DISCORD_TOKEN or TOKEN in environment.")
client.run(token)
def main():
load_dotenv()
initialize_database()
client = Client()
token = os.getenv("DISCORD_TOKEN") or os.getenv("TOKEN")
if not token:
raise SystemExit("ERROR: Discord token not found. Set DISCORD_TOKEN or TOKEN in environment.")
# Print the token for debugging purposes (remove this in production)
print(f"DEBUG: Using token starting with {token[:5]}.")
client.run(token)
if __name__ == "__main__":