Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #103 from dispydev/master
Browse files Browse the repository at this point in the history
Renaming classes
  • Loading branch information
bleudev authored Nov 9, 2022
2 parents d6f68dd + b9380dc commit 7d1b05d
Show file tree
Hide file tree
Showing 25 changed files with 593 additions and 1,387 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ on your server, creating mini games in discord, auto moderation in your discord
For example, you can reply to message that is sended by any user using this code:

```python
from disspy import DisBot, DisMessage # Import package
from disspy import Client, Message # Import package
import os

TOKEN = os.environ["TOKEN"]
bot = DisBot(token=TOKEN) # Create a bot
client = Client(TOKEN) # Create a client

@bot.on_message("create") # On message create
async def on_messagec(message: DisMessage): # message - sended message
await message.reply("Hello, world!") # Reply to a message
@client.on_message("create") # On message create
async def on_messagec(message: Message): # message - sended message
await message.reply("Hello!") # Reply to a message

bot.run() # Run bot in Gateway
client.run() # Run client
```

# Download package
Expand Down
35 changes: 13 additions & 22 deletions disspy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,20 @@

# Imports
# Files
import disspy.abstract
import disspy.activity
import disspy.app_commands
import disspy.application
import disspy.bot
import disspy.client
import disspy.channel
import disspy.embed
import disspy.errors
import disspy.guild
import disspy.reaction
import disspy.thread
import disspy.typ
import disspy.ui
import disspy.user

# Classes
from disspy.abstract import Messageable, Channel, Message, Thread
from disspy.activity import Activity, ActivityType
from disspy.app_commands import (
ApplicationCommandType,
Expand All @@ -56,19 +53,17 @@
Localization,
)
from disspy.channel import (
DisChannel,
DisDmChannel,
DisMessage,
DmMessage,
MessageDeleteEvent,
DmMessageDeleteEvent,
Channel,
ChannelType,
Message,
RawMessage,
)
from disspy.bot import DisBot, DisBotEventType
from disspy.http import DisApi, DisFlags, JsonOutput
from disspy.embed import DisEmbed, DisField, DisColor
from disspy.guild import DisGuild
from disspy.user import DisUser
from disspy.reaction import DisEmoji, DisOwnReaction, DisReaction, DisRemovedReaction
from disspy.client import Client
from disspy.http import Flags
from disspy.embed import Embed, Field, Color
from disspy.guild import Guild
from disspy.user import User
from disspy.reaction import Emoji, Reaction
from disspy.ui import (
Component,
ActionRow,
Expand All @@ -78,10 +73,8 @@
SelectMenu,
SelectMenuOption,
)

from disspy.thread import DisNewsThread, DisThread, DisPrivateThread
from disspy.state import ConnectionState
from disspy.webhook import DispyWebhook
from disspy.webhook import DispyWebhook, TypingInfo
from disspy.application import Application

# Methods for other variables
Expand All @@ -106,17 +99,15 @@ def _all_generator(alls: list) -> tuple:

# __all__
__alls__: list = [
disspy.abstract.__all__,
disspy.activity.__all__,
disspy.app_commands.__all__,
disspy.application.__all__,
disspy.bot.__all__,
disspy.client.__all__,
disspy.channel.__all__,
disspy.embed.__all__,
disspy.errors.__all__,
disspy.guild.__all__,
disspy.reaction.__all__,
disspy.thread.__all__,
disspy.ui.__all__,
disspy.user.__all__,
]
Expand Down
192 changes: 0 additions & 192 deletions disspy/abstract.py

This file was deleted.

Loading

0 comments on commit 7d1b05d

Please sign in to comment.