Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Discord OAuth Flow #1129

Merged
merged 39 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e16bac3
Implemented Discord OAuth Flow && a Discord bot with creating public …
AveryYay Oct 29, 2024
2307a7d
Apply suggestions from code review
AveryYay Oct 29, 2024
c7f04d1
Integrated OAuth flow into discord_app.py
AveryYay Oct 30, 2024
0938fb1
Added init for camel.bots.discord
AveryYay Oct 30, 2024
548c52e
Delete examples/bots/discord_OAuth_flow.py
AveryYay Oct 30, 2024
6db7ba0
Deleted unnecessary import in camel.bots.discord.__init__.py
AveryYay Oct 30, 2024
5350d8a
Updated OAuth in DiscordApp
AveryYay Nov 24, 2024
87f255f
Merge branch 'camel-ai:master' into master
AveryYay Nov 24, 2024
62a2f51
Style fix && deleted the example discord bot
AveryYay Nov 24, 2024
ba84a25
minor fix
AveryYay Nov 24, 2024
67c55ed
Fixed oauth redirect logic
AveryYay Nov 24, 2024
23da0ba
Changed permission data type
AveryYay Nov 24, 2024
940188f
Merge branch 'master' into master
Wendong-Fan Nov 24, 2024
b414ec6
Preliminary implementation of Discord OAuth flow
AveryYay Nov 28, 2024
800ede5
Merge remote-tracking branch 'origin/master'
AveryYay Nov 28, 2024
4ca2ee8
Changed the installation storage handling to aiosqlite && Added Disco…
AveryYay Nov 29, 2024
6ff54a6
pre-commit fixes
AveryYay Nov 29, 2024
9354dee
Resolved conflicts and merge
AveryYay Nov 29, 2024
a6b9aae
Merge branch 'camel-ai-master' (resolved conflicts)
AveryYay Nov 29, 2024
04e5d71
Pre-commit: license updated
AveryYay Nov 29, 2024
d044166
Merge branch 'camel-ai:master' into master
AveryYay Dec 22, 2024
327b271
Merge branch 'master' into master
Wendong-Fan Dec 24, 2024
c598730
Added an example of the new discord bot with the updated discord inst…
AveryYay Dec 27, 2024
bb8f3e4
Merge remote-tracking branch 'origin/master'
AveryYay Dec 27, 2024
bc51e22
Fixed some mypy error
AveryYay Dec 27, 2024
41e4711
Example added
AveryYay Dec 29, 2024
c53fe0c
Added aiosqlite to poetry lock
AveryYay Dec 29, 2024
61280bd
Merge branch 'master' into master
AveryYay Dec 29, 2024
8b7bd0e
modified poetry lock
AveryYay Dec 29, 2024
7160208
Added discord intents as a parameter && minor style change
AveryYay Jan 3, 2025
250cbc9
Merge branch 'tmp'
AveryYay Jan 6, 2025
e3bbece
Updated poetry
AveryYay Jan 6, 2025
4047229
Cleaned license && deleted unused discord_app.py
AveryYay Jan 7, 2025
2fc8364
Added docstring for DiscordInstallation
AveryYay Jan 7, 2025
e5be892
pre-commit
AveryYay Jan 7, 2025
dd166b7
Switched logger && pre commit
AveryYay Jan 7, 2025
28b9096
Merge branch 'tmp'
AveryYay Jan 8, 2025
6f720c5
Updated poetry lock
AveryYay Jan 8, 2025
db686de
Added error handling in exchange_code_for_token_response
AveryYay Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion camel/bots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
from .discord_app import DiscordApp
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check and clean the license info

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
from .discord import DiscordApp
from .slack.models import (
SlackAppMentionEventBody,
SlackAppMentionEventProfile,
Expand Down
39 changes: 39 additions & 0 deletions camel/bots/discord/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
# Licensed under the Apache License, Version 2.0 (the “License”);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean

#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an “AS IS” BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =========== Copyright 2023 @ CAMEL-AI.org. All Rights Reserved. ===========
from .discord_app import DiscordApp
from .discord_installation import DiscordInstallation
from .discord_store import (
DiscordBaseInstallationStore,
DiscordSQLiteInstallationStore,
)

__all__ = [
"DiscordApp",
"DiscordInstallation",
"DiscordSQLiteInstallationStore",
"DiscordBaseInstallationStore",
]
Loading
Loading