mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-27 15:37:03 +01:00
Start command update
This commit is contained in:
parent
20f5a94cd8
commit
0394f510ff
@ -2,4 +2,6 @@ config = {
|
||||
'bot-token': "Discord bot token",
|
||||
|
||||
'database-uri': "driver://username:password@host:port/database",
|
||||
|
||||
'command-prefix': "<@{}>".format("BOT ID HERE"),
|
||||
}
|
@ -10,9 +10,10 @@ logging.basicConfig(filename='titanbot.log',level=logging.INFO,format='%(asctime
|
||||
logging.getLogger('TitanBot')
|
||||
logging.getLogger('sqlalchemy')
|
||||
|
||||
class Titan(discord.Client):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
class Titan(commands.Bot):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(command_prefix = config['command-prefix'])
|
||||
self.aiosession = aiohttp.ClientSession(loop=self.loop)
|
||||
self.http.user_agent += ' TitanEmbeds-Bot'
|
||||
self.database = DatabaseInterface(self)
|
||||
|
@ -374,10 +374,11 @@ def create_unauthenticated_user():
|
||||
response.status_code = 403
|
||||
return response
|
||||
|
||||
@api.route("/update_unauthenticated_user", methods=["POST"])
|
||||
@rate_limiter.limit("1 per 15 minute", key_func=guild_ratelimit_key)
|
||||
def update_unauthenticated_user():
|
||||
# todo: update user
|
||||
# @api.route("/update_unauthenticated_user", methods=["POST"])
|
||||
# @rate_limiter.limit("1 per 15 minute", key_func=guild_ratelimit_key)
|
||||
# def update_unauthenticated_user():
|
||||
# # todo: update user
|
||||
# new_name = request.form.get('new_username')
|
||||
|
||||
@api.route("/query_guild", methods=["GET"])
|
||||
@valid_session_required(api=True)
|
||||
|
Loading…
Reference in New Issue
Block a user