Skip to content

Commit d2d556a

Browse files
committed
removed beta necessity for sending to nerimity
1 parent d44443b commit d2d556a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/astroidapi/sending_handler.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ async def send_to_guilded(cls, updated_json, endpoint, attachments: list = None)
183183
async def send_to_nerimity(cls, updated_json, endpoint, attachments: list = None):
184184
try:
185185
read_nerimity = await read_handler.ReadHandler.check_read(endpoint, "nerimity")
186-
if read_nerimity is False and updated_json["config"]["isbeta"] is True:
186+
if read_nerimity is False:
187187
async with aiohttp.ClientSession() as session:
188188
response_json = updated_json
189189
sender_channel = response_json["meta"]["sender-channel"]
@@ -198,9 +198,14 @@ async def send_to_nerimity(cls, updated_json, endpoint, attachments: list = None
198198
raise errors.SendingError.ChannelNotFound(f'The channel {sender_channel} ({updated_json["meta"]["sender"]}) does not seem to be a registered channel on other platforms.')
199199
message_author_name = response_json["meta"]["message"]["author"]["name"]
200200
message_content = response_json["meta"]["message"]["content"]
201-
headers = {
202-
"Authorization": f"{config.NERIMITY_TOKEN}",
203-
}
201+
if updated_json["config"]["isbeta"] is True:
202+
headers = {
203+
"Authorization": f"{config.BETA_NERIMITY_TOKEN}",
204+
}
205+
else:
206+
headers = {
207+
"Authorization": f"{config.NERIMITY_TOKEN}",
208+
}
204209
print(channel_id)
205210
payload = {
206211
"content": f"**{message_author_name}**: {message_content}",

0 commit comments

Comments
 (0)