Skip to content

Commit

Permalink
feat: Add archive folder/file
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoquiet committed Jun 22, 2022
1 parent 608a178 commit 1016a23
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions KertBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import time
import requests
import json
import datetime

bot = discord.Bot()

Expand Down
4 changes: 4 additions & 0 deletions cogs/fairy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import requests
import json
import datetime as dt

fairyDevice = ['2A:BC:84:94:87:9C', '1C:C1:0C:E2:54:78', '3E:57:55:B5:7A:8A', 'EE:A6:85:AE:31:2C', '56:98:A2:57:F4:C3']

Expand All @@ -28,6 +29,9 @@ async def fairy(self, ctx):
# 노트북: 1C:C1:0C:E2:54:78
# 아이패드: 56:98:A2:57:F4:C3

with open(f'fairy_archive/{dt.datetime.now().strftime("%Y.%m")}.txt', 'a') as archive:
archive.write(dt.datetime.now().strftime(f'%Y-%m-%dT%H:%M:%S {ctx.author.name} {ctx.author.id}\n'))

with requests.Session() as session:
login_url = "http://router.asus.com/login.cgi"

Expand Down
2 changes: 1 addition & 1 deletion cogs/meal.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ def recommend_lunch(self, ctx):


def setup(bot):
bot.add_cog(Fairy(bot))
bot.add_cog(Meal(bot))
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

botName = 'KertBot'
botID = 976727339239100466
botToken = base64.b64decode(b'T1RjMk56STNNek01TWpNNU1UQXdORFkyLkdGTVlOQy5QUjZJRkRsMmNGejRsMURRaW9peTJyN29nMWRyUS0wVVcwNVFxSQ==').decode('ascii')
botToken = base64.b64decode(b'TnpVNE9UVTVOamcyTkRjeU5UWTBOelEyLkdRUjRIVS5EWmNuRmZKSTdYZHlRRlA3dW5GblN0QmNmeE9kY2swYlg3TzZaNA==').decode('ascii')
EXTENSIONS = ['cogs.help', 'cogs.open', 'cogs.fairy', 'cogs.meal', 'cogs.info']

KertColor = 0x000000
Expand Down

0 comments on commit 1016a23

Please sign in to comment.