Giter Site home page Giter Site logo

ft-webhook-to-discord's Introduction

ft-webhook-to-discord's People

Contributors

nafuka11 avatar

Stargazers

 avatar

Watchers

 avatar

ft-webhook-to-discord's Issues

discord.py v2対応

2023年初めにdiscord.py v1で使われているAPIが廃止されるため、その前にv2対応しましょう。

begin_at, end_atをfromisoformat()する時ValueError

Traceback

Traceback (most recent call last):
File "/var/task/src/message.py", line 19, in on_ready
embed = create_event_embed(body)
File "/var/task/src/message.py", line 40, in create_event_embed
begin_at = _get_local_timestr(event["begin_at"])
File "/var/task/src/message.py", line 73, in _get_local_timestr
date = _from_iso8601_str(timestr).astimezone(jst)
File "/var/task/src/message.py", line 89, in _from_iso8601_str
d = datetime.fromisoformat(time_str)
ValueError: Invalid isoformat string: '2021-02-18 10:00:00 UTC'

原因

日付文字列に UTC が含まれているため。

対処

UTC以外のtimezoneになる可能性があるか確認し、ならなければUTC削除で対処。
可能性があれば、timezone変換用のライブラリ導入(Python3.8ではzoneinfoが使えないため)して、timezoneをparseする。

水平展開

取得するデータで、42 APIと異なるデータがないか確認する。

key OK/NG
name OK
begin_at 本Issueで修正
end_at 本Issueで修正
max_people OK
location OK
kind OK
id OK
description OK

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.