reformat
This commit is contained in:
1 parent
783b38e28d
commit
32ee918415
10 files changed
+88
-71
No files matched your search
@@ -1,6 +1,7 @@
|
||||
from typing import Optional
|
||||
|
||||
import discord
|
||||
|
||||
from utils.base import BasicView
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
class Emojis:
|
||||
food = "<:food:1220371848789753926>"
|
||||
aluminum = "<:aluminum:1220371851692343397>"
|
||||
@@ -12,4 +13,4 @@ class Emojis:
|
||||
uranium = "<:uranium:1220371869572796466>"
|
||||
oil = "<:oil:1220371873267843143>"
|
||||
coal = "<:coal:1220371877013229619>"
|
||||
money = "<:dollarsym:1220378339970252841>"
|
||||
money = "<:dollarsym:1220378339970252841>"
|
||||
+1
-9
@@ -6,19 +6,11 @@ from typing import List, Union
|
||||
import aiohttp
|
||||
import discord
|
||||
|
||||
TESTID = 356099868638445578
|
||||
ID = int(base64.b64decode(os.getenv("TOKEN").split(".")[0]))
|
||||
|
||||
|
||||
async def get_webhook(
|
||||
channel: Union[discord.TextChannel, discord.ForumChannel, discord.VoiceChannel]
|
||||
) -> discord.Webhook:
|
||||
"""Get a webhook created by bot in the channel"""
|
||||
if ID != TESTID:
|
||||
wname = "ゼロ"
|
||||
else:
|
||||
wname = "ゼロ~"
|
||||
|
||||
wname = "brahmos"
|
||||
hooks: List[discord.Webhook] = await channel.webhooks()
|
||||
for hook in hooks:
|
||||
if hook.name == wname:
|
||||
|
||||
+3
-1
@@ -1,9 +1,11 @@
|
||||
import asyncio
|
||||
from typing import List, Literal, Optional, Union
|
||||
|
||||
from discord import ButtonStyle, Embed, Interaction, Message, TextStyle, Webhook
|
||||
from discord import (ButtonStyle, Embed, Interaction, Message, TextStyle,
|
||||
Webhook)
|
||||
from discord.ext.commands import Bot, Context, errors
|
||||
from discord.ui import Button, Item, Modal, Select, TextInput, button
|
||||
|
||||
from utils.base import BasicView
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import pnwkit
|
||||
|
||||
|
||||
class Bank:
|
||||
def __init__(self, kit: pnwkit.QueryKit):
|
||||
self.kit = kit
|
||||
|
||||
async def balance(self, id: int):
|
||||
"""
|
||||
receiver_type:
|
||||
()
|
||||
"""
|
||||
resources = await self.kit.query(
|
||||
"alliances",
|
||||
{"id": 10177, "first": 1},
|
||||
"money, food, uranium, coal, iron, oil, bauxite, iron, lead, munitions, gasoline, aluminum, steel",
|
||||
)
|
||||
Reference in new issue
Block a user