Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Beta #6

Merged
merged 25 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ ban.py
/env
main.exe
#im teleporting to you yay
main.cpp
main.cpp
serviceAccountKey2.json
46 changes: 46 additions & 0 deletions DataBase/Maxigames
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
commands
tux
neonparadox
nianny
ajr
maxigames
beta
starboard
ticket
topgg
discord
bot
client
python
minigames
uptimerobot
dice
bigdice
kawaii
connectfour
tictactoe
hallo
current
seconds
invite
official
whoami
fibonacci
lmgtfy
counting
trivia
scramble
snakeeyes
math
suggest
coinflip
gamble
money
balance
leaderboard
hourly
daily
hangmanlist
servercount
randnum
numprop
1 change: 1 addition & 0 deletions DataBase/words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Languages
Legal Terms
Mammals
Math and Numbers
Maxigames
Measurement
Metals
Military
Expand Down
28 changes: 18 additions & 10 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,46 @@
import discord
from discord.ext import commands
import os
import time
from client import Client

# from start import keep_alive
import firebase_admin
from firebase_admin import firestore
from firebase_admin import credentials
from discord_components import *
from discord_slash import SlashCommand, SlashContext

with open('config.json', 'r') as file:
with open("config.json", "r") as file:
data = json.load(file)
client = Client(command_prefix=[data["prefixBeta"]], help_command=None)

cred = credentials.Certificate("serviceAccountKey.json")
cred = credentials.Certificate("serviceAccountKey2.json")
firebase_admin.initialize_app(cred)

db = firestore.client()
DiscordComponents(client)
slash = SlashCommand(client, sync_commands=True, sync_on_cog_reload=True, override_type=True)
for filename in os.listdir('./cogs'):
if filename.endswith('.py'):
client.load_extension(f'cogs.{filename[:-3]}')
slash = SlashCommand(
client, sync_commands=True, sync_on_cog_reload=True, override_type=True
)
for filename in os.listdir("./cogs"):
if filename.endswith(".py"):
client.load_extension(f"cogs.{filename[:-3]}")


@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game(name="m!help on " + str(len(client.guilds)) + " servers", type=0))
await client.change_presence(
status=discord.Status.online,
activity=discord.Game(
name="m!help on " + str(len(client.guilds)) + " servers", type=0
),
)
print("We have logged in as {0.user}".format(client))


# keep_alive()

with open('config.json', 'r') as file:
with open("config.json", "r") as file:
data = json.load(file)
client.run(data["tokenIdBeta"])
#test!

12 changes: 6 additions & 6 deletions client.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@

import discord
from discord.ext import commands
import datetime
import json
import config


class Client(commands.Bot):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.help_command = None
self.start_time = datetime.datetime.utcnow()

@property
def uptime(self):
return datetime.datetime.utcnow() - self.start_time

@property
def config(self):
return config

@property
def primary_colour(self):
return self.config.primary_colour

@property
def error_colour(self):
return self.config.error_colour

@property
def icon_url(self):
return self.config.icon_url
return self.config.icon_url
Loading