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:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user