Saravanan666/pypi-org huggingface dataset:
Package: discordbio
discordbioAn asynchronous Python wrapper for thediscord.bio APIInstallingpip install discordbioUsageSetting up the clientThis will be used to make requests to the APIfromdiscordbioimportDBioClientclient=DBioClient()ExceptionsErrorDescriptiondiscordbio.errors.BaseDBioExceptionException others subclass from, can be used to catch any error thrown from the wrapperdiscordbio.errors.DBioErrorRaised when discord.bio doesn't return a successful responsediscordbio.errors.HTTPExceptionRaised when the request to discord.bio itself failsGetting a user's details, via username or Discord IDAll methods of DBioClient are typed meaning your IDE should auto complete the attributes
If not, you can import the types (UserDetails and UserConnections) and manually set the typedetails=awaitclient.details("geek")# With TypefromdiscordbioimportUserDetailsdetails:UserDetails=awaitclient.details("geek")Getting a specific value from a user's details, e.g. description or a users flagsdescription=(awaitclient.details("geek")).settings.descriptionflags=(awaitclient.details("geek")).discord.flags# Flags can be used to determine a user's badgesGetting a user's connectionsconnections=awaitclient.connections("geek")# With Discord connectionsconnections=awaitclient.connections("geek",with_discord=True)# With TypefromdiscordbioimportUserConnectionsconnections:UserConnections=awaitclient.connections("geek",with_discord=True)Miscellaneous Endpointsusers:int=awaitclient.total_users()# Returns total user countfromdiscordbioimportPartialUserfromtypingimportListupvoted:List[PartialUser]=awaitclient.top_upvoted()AttributesUserDetails (from client.details)settings:Settingsdiscord:DiscordSettingsuser_id:intname:strstatus:Optional[str]description:Optional[str]verified:boolupvotes:intpremium:boollocation:Optional[str]gender:Optional[str]birthday:Optional[datetime]email:Optional[str]occupation:Optional[str]created_at:datetimebanner:Optional[str]Discordid:intusername:stravatar:Optional[str]avatar_url:stris_avatar_animated:booldiscriminator:strflags:intPartial User (from client.top_upvoted)user_id:intname:strdescription:Optional[str]verified:boolupvotes:intpremium:booldiscord:DiscordConnections (from client.connections)github:Optional[str]website:Optional[str]instagram:Optional[str]snapchat:Optional[str]linkedin:Optional[str]discord:List[DiscordConnection]Discord Connectionsconnection_type:strname:strurl:str
Package: discordbook
DiscordBookA Discord module for bot developers wanting a lightweight and customizable package for a book-like info display.Example of a well-formatted book display:Terminology:Book- abstracted structure to useLine- particular item inside the book - in the above example, "Abyssal Buckler" would be a lineChapter- group of lines - in the example, "A" would be a chapterPage- combination of chapter headers and lines that can be displayed on the embedOptionsCurrently, 2 types of books are supported - a default book with the following default parameters:Book(chapters=[],title="\a",description='\a',color=1,image=None,per_page=10)Example usage of Book:fromdiscordbookimportBook# Creating the content for the booklines1=["test line 1","test line 2","test line 3"]chapter1=Chapter("Test Chapter 1",lines1)lines2=["test line 1","test line 2","test line 3"]chapter2=Chapter("Test Chapter 2",lines2)lines3=["test line 1","test line 2","test line 3"]chapter3=Chapter("Test Chapter 3",lines3)lines4=["test line 1","test line 2","test line 3"]chapter4=Chapter("Test Chapter 4",lines4)lines5=["test line 1","test line 2","test line 3"]chapter5=Chapter("Test Chapter 5",lines5)# Initializing the object itselfitem_book=Book([chapter1,chapter2,chapter3,chapter4,chapter5],"Test Book","Test book Desc")# A blocking method that will send and constantly update the book displayawaititem_book.open_book(client,message.channel,message.author)And an alphabetically ordered book with the following default parameters:AlphabeticalBook(content=[],title="\a",description='\a',color=1,per_page=10,ignore_caps=True)Example usage of Alphabetical Book:fromdiscordbookimportAlphabeticalBook# Creating the content for the booklines1=["Test","test","Abc","bc","D","Zee"]# Initializing the object itselfa_book=AlphabeticalBook(lines1,"Test Book","test desc",ignore_caps=False)# A blocking method that will send and constantly update the book displayawaita_book.open_book(client,message.channel)ResultCaveatsBooks are static once generatedOpening a book should be the last call in your function, since it will prevent the rest of your code from runningCreating a book with empty lines will result in errorsTODO:Develop ordering of chapters based of less than function?Bookmark feature to come back to this page after?Give more fine-grained control with non-blocking booksBetter error checking on small/empty booksSet browsing speed, better options for settingsBetter documentationOpen to pull requests or issues!
Package: discord-bot-creator
Bot CreatorThis module usesdiscord.py v2.0Install it with this command:pip install git+https://github.com/Rapptz/discord.pyVerify you have git installed in your computer or this command doesn't work.Create() method:In this method you have:cogbot(coming soon)Usage:create("filename.py").cog(type): Create a cog
Cogs Types:1 = Normal2 = With groups
Package: discordbotdash
discordbotdashA discord.py package for testing Discord bots in your browser and viewing statistics. You can turn commands on and off, see the code for them, and view your shards with their respective latencies. This is still in development and more features will come.InstallationPyPiRunpip install discordbotdashfor the latest version.Usage - ExampleOnce you have installed it, you can easily open up a dashboard in your browser:importdiscordfromdiscord.extimportcommandsimportdiscordbotdash.dashasdbdbot=commands.AutoShardedBot("!")@bot.eventasyncdefon_ready():dbd.openDash(bot)# optional port: dbd.openDash(bot, port=5000)bot.run("token")Ensure that you are opening the dashboard before you are running the bot withbot.run. Your dashboard will be open on127.0.0.1:5000, or a different port if you have specified one, once you have runopenDash.ChangelogYou can now specify a port or leave it unspecified to default to 5000.Added console to view events and eval() with your bot.ScreenshotsCogsCommandsShardsConsoleContributingPull Requests for new features are always welcome.If you have a suggestion or a bug to report, open an issue.
Package: discord-bot-generator
discord-bot-generatorFastest and easiest way to create a new discord bot project ✨🚀Installation$ pip install discord-bot-generatorThe project is still in its early stages, so bugs are expected.FeaturesJust one command to create a new project.Community-made Templates (coming soon).Easy to use.Intializes pipenv for you.Installs dependencies for you.Initializes git for you.Development Setupgit clone https://github.com/SyedAhkam/discord-bot-generatorpipenv installRelease History0.0.1: First ReleaseMetaMy discord tag: Syed#0006My email:smahkam57@gmail.comThis project is distributed under the MIT license. See LICENSE for more information.ContributingFork.Create your feature branch. (git checkout -b feature/fooBar)Development Setup.Commit your changes. (git commit -am 'Add some fooBar')Push to the branch (git push origin feature/fooBar)Create a new Pull RequestTODOAdd community made templates support.Fix potential bugs.
Package: discord-bot-maker
IntroductionUse this module to create professional discord bots in just a few lines of code. Created by Aaryan Dehade to fulfill the wishes of gamers who want an awesome custom bot for their discord server.Short CodeEasy to Learn and UnderstandRegular updates to functionalityCode Formatfromdiscord_bot_makerimportDBotd=DBot(bTOKEN:str,bPrefix:tuple=".",owner:str=FATHER,helpCommand:bool=True,baseCode:bool=True)d.createCommand(trigger=trigger,reply=reply1,reply2=reply2,emoji=emoji,image=link,help=help)d.bRun()Code Format (Shorter)fromdiscord_bot_makerimportDBotd=DBot(bTOKEN:str,bPrefix:tuple=".",owner:str=FATHER,helpCommand:bool=True,baseCode:bool=True)d+(trigger,reply1,reply2,emoji,link,help)d()Code Format (Shrotest)fromdiscord_bot_makerimportDBotwithDBot(TOKEN)asd:d+(trigger,reply1,reply2,emoji,link,help)Example Programfromdiscord_bot_makerimportDBotd=DBot(TOKEN)d.createCommand(trigger="jump",reply="whoop!",reply2="I just jumped",emoji="😄",image="jumping.gif",help="jumps")d()Extra FeaturesGet number of commands usinglen(d)Get instance of bot usingd.getBotInstance(replacedwith DBot object)Internal VariablesAuthor<author name><author mention><author display name><author discriminator>Message<message time><message content><message clean content>Channel<channel name><channel topic><channel category><channel mention>Guild<guild name><guild member count><guild description><guild features>Use the above given variables as strings in reply or reply2NOTE :Mentions will only work in reply2Pre Made commandscommandHi(aliases : list, help : str, message : str, description : str, gif : str)Adds Hi CommandcommandHelp(title : str, description : str)Adds Help Message CommandMore InformationThe Prefix Tuple can include as many prefixes as you may likeTheTOKENmust be copied fromDiscord Developer PortalYou can create as many commands as you likeThebRun()command is required to run the bot(You can also call the object like so:d()if d is your DBot object)Join our discord serverhereversion = 1.0.0
Package: discordbot-sync
DiscordbotThis package provides an interface to the RESTful and websocket Discord API so users don't have to worry about rate limits, asyncio, or error handling.It's as simple as:importdiscordbotasdiscordbot=discord.Bot("my_api_token")defon_message(raw_event,message):print(message.author,"sent a message in",message.channel,"which said",message.content)ifmessage.content=="!ping":bot.send_message(message.channel,"Pong!")bot.on_event(discord.event.guild_message_sent,on_message)bot.run()discordbot also provides a simple way to add commands to your botimportdiscordbotasdiscordbot=discord.Bot("my_api_token")role_moderator='00000000000000'# the id of the role which is required to use the kick commanddefcmd_kick(message,member,reason):bot.kick(message.guild,member,reason)bot.send_message(message.channel,"Member%skicked. They are allowed to re-join. Ban them if you do not want this behavior."%member,reply_to=message,reply_ping=False)bot.register_command("kick","Temporarily remove someone from the server",cmd_kick,required_role=role_moderator,args=[{"name":"member","description":"The member to kick","type":"user"},{"name":"reason","description":"Reason for kick","type":"string","default":None}])bot.command_prefix="!"bot.register_default_commands()# (optional) adds !cmds and !pingbot.run()for more examples, please see thisproject on github
Package: discord-cache
Discord CacheA better way to boost the performance of your Discord bot.Installationpipinstalldiscord-cacheUsagefromdiscord_cacheimportCachecache=Cache()anyfunction():# Do somethingcache.insert("key","value")# Do something elseanyfunction2():# Do somethingcache.get("key")# Do something elseanyfunction3():# Do somethingcache.delete("key")# Do something elseContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseMIT
Package: discordcalendarbot
What is discordcalendarbot ?discordcalendarbot is a Discord bot that manage a Google shared calendar.How to use the bot ?Installation$ pip install discordcalendarbotConfigurationInsert your Discord bot token in the conf.py file.
Insert your Google Calendar API informations in the client_secret.json file.Launching$ python -m discordcalendarbotComands availaibleEvery command start with ‘?’ character.Get some help?helpAdd a new event to the calendar?add your_eventexample : ?add Dentist tommorow at 5 o’clockDelete an event of the calendar?delete event_idUpdate an event of the calendar?update event_idSearch events containing a given word or sentence?q your_wordexample : ?s DentistShow event at a given date?date YYYY-MM-DDShow events of the day/week/month?day?week?month
Package: discord-class-commands
An extension module for discord.py that facilitates class-based creation of Discord application commands.Creditsdiscord.py: Docs and various code snippets.IAmTomahawkx: Initial idea and design.Key FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.Optimised in both speed and memory.Fully compatible with discord.py’s application command implementation without monkey-patching.InstallingPython 3.8 or higher is requiredTo install the extension, you can just run the following command:# Linux/macOSpython3-mpipinstall-Udiscord-class-commands# Windowspy-3-mpipinstall-Udiscord-class-commandsTo install the development version, do the following:$gitclonehttps://github.com/dolfies/discord-class-commands$cddiscord.py$python3-mpipinstall-U.This extension depends on version 2.0 of discord.py or a compatible fork.Quick Exampleimportdiscordfromdiscord.extimportclass_commandsclient=discord.Client(intents=discord.Intents.default())tree=discord.app_commands.CommandTree(client)@client.eventasyncdefsetup_hook():awaittree.sync()classPing(class_commands.SlashCommand):asyncdefcallback(self):awaitself.send(f'Pong!')tree.add_command(Ping)client.run('token')You can find more examples in the examples directory.LinksDocumentationdiscord.py DocumentationOfficial Discord ServerDiscord API
Package: discord-colorize
Colored Codeblocks - DiscordColored Codeblocks for Discord Bots using ANSI Escape Sequences.You can dohelp(discord_colorize.Colors)to see all the available colors along with a detailed docstring on how to use the package.Usage -importdiscord_colorizecolors=discord_colorize.Colors()data=f"""```ansi{colors.colorize('Hello World!',fg='green',bg='indigo',bold=True,underline=True)}```"""help(discord_colorize.Colors)Extra InformationCreated by TheOnlyWayUp#1231 -https://github.com/TheOnlyWayUp/classColors:r"""Represents the class used for normal strings to Discord ANSI Codeblocks that support colors.Usage----------------from discord.colorize import Colorscolors = Colors()message = colors.colorize('Hello World!', fg='green', 'bg'='indigo', 'bold'=True)All Colors----------------Foreground -・gray - 30・red - 31・green - 32・yellow - 33・blue - 34・pink - 35・cyan - 36・white - 37Background -・darkBlue - 40・orange - 41・gray - 46・lightGray - 43・lighterGray - 44・indigo - 45・white - 47Formatting -・bold - 1・underline - 4・default - 0Both the names of colors and styles (bold, gray, darkBlue, etc), and their integer equivalents (1, 30, 40) are accepted as valid inputs for colorization. Color names are not case-sensitive."""classunknownColor(Exception):"""The unknown color class, this exception is raised when a color is not found."""...def__init__(self):"""Initializes the Colors class."""...defreturnColor(self,color:str,kind:str)->int:"""Returns the color code for the given color.Args:color (str): The color to return the code for.kind (str): The kind of color to return.Raises:self.unknownColor: Raised when the color is not found.Returns:int: The color code."""...defcolorize(self,text:str,bg:Union[str,int]=0,fg:Union[str,int]=0,bold:bool=0,underline:bool=0,)->str:"""Returns a string with the ANSI color codes for the given parameters.Args:text (str): The text to colorize.bg (Union[str, int], optional): The background color to use. Defaults to no background.fg (Union[str, int], optional): The foreground color to use. Defaults to no foreground.bold (bool, optional): Whether or not to use bold. Defaults to no bold.underline (bool, optional): Whether or not to use underline. Defaults to no underline.Returns:str: The colorized string."""...
Package: discord-component
discord-componentsAn unofficial third party library of discord.py for discord components.Welcome!Discord components are cool, but discord.py will support it on version 2.0. It
is hard to wait, so we made a third-party library for using components such as
buttons or selects!This project is open source ⭐.Also, there is anofficial discord server, so
if you have any questions, feel free to ask it on this server.FeaturesYou can use message components and handle component interactions easily!Third-party of discord.py.DocsGitbook version(Up to
date)Sphinx Version(Currently outdated)Installpip install --upgrade discord-componentsExampleYou can see many exampleshere.LicenseThis project is under the MIT License.
Package: discord-components-mirror
discord-components-mirrorAn unofficial third party library of discord.py for discord components.Welcome!Discord components are cool, but discord.py will support it on version 2.0. It
is hard to wait, so we made a third-party library for using components such as
buttons or selects!This project is open source ⭐.Also, there is anofficial discord server, so
if you have any questions, feel free to ask it on this server.FeaturesYou can use message components and handle component interactions easily!Third-party of discord.py.DocsGitbook version(Up to
date)Sphinx Version(Currently outdated)Installpip install --upgrade discord-components-mirrorExampleYou can see many exampleshere.LicenseThis project is under the MIT License.
Package: discord-components-paginator
discord-components Button PaginatorExamplefromdiscord_components_paginatorimportPaginator,PaginatorStyle...@bot.command()asyncdefpaginator_command(ctx):embeds=[discord.Embed(title=f"Page{page}")forpageinrange(1,6)]paginator=Paginator(bot,ctx,PaginatorStyle.FIVE_BUTTONS_WITH_COUNT,embeds)awaitpaginator.start()
Package: discord-componentsss
discord-componentsAn unofficial third party library of discord.py for discord components.Welcome!Discord components are cool, but discord.py will support it on version 2.0. It
is hard to wait, so we made a third-party library for using components such as
buttons or selects!This project is open source ⭐.Also, there is anofficial discord server, so
if you have any questions, feel free to ask it on this server.FeaturesYou can use message components and handle component interactions easily!Third-party of discord.py.DocsGitbook version(Up to
date)Sphinx Version(Currently outdated)Installpip install --upgrade discord-componentsExampleYou can see many exampleshere.LicenseThis project is under the MIT License.
Package: discord-config
discord-configis a Python library to help saving and loading configuration files.Warning: Still in development, so use with care!Installationdiscord-config is available on PyPI underdiscord_config:$pipinstall-Udiscord_configOr for the latest development version:$pipinstall-Ugit+https://github.com/nowakcasimir/discord-config.git#egg=discord_configBasic Examplefromdiscord_configimportSettings# (settings will be saved by default to settings.json, if it is not defined)settings=Settings()print(settings)print(settings.token)#> "...yourtoken..."print(settings.server_id)#> "123123123"settings.clear()# Clears the settings# You can define arbitrary settings to Settings object defaultssettings=Settings(defaults={"token":"...yourtoken...","botname":"MyDiscordBot","joinservers":False,"idleTimer":100})print(settings)print(settings.token)#> "...yourtoken..."print(settings.botname)#> "...MyDiscordBot..."print(settings.joinservers)#> Falseprint(settings.idleTimer)#> 100# Defaults were overwrittentry:print(settings.server_id)exceptExceptionase:#> AttributeError: 'Settings' object has no attribute 'server_id'passsettings.set('id','broker')print(settings.id)#> 100settings.save()# outputs settings.json by defaultsettings=Settings()# Now it loads settings.jsonprint(settings)settings.clear()DocumentationSee the documentation athttps://discord-rnn.neocities.org/.
Package: discord-continued
discord-continuedAn API wrapper for Discord interactions.The current version is Stable however it’s still very unrefined and requires a lot of work and documentation.This Bot feaures chunks from old discord.py that I have repurposed for this library, as they work extremely well, however I don’t intend on just taking over from what was left. A lot of the code is new and rewritten.InstallationUse this line to install the library:pipinstall-Udiscord-continued
Package: discord-cooldown
Package Name:discord_cooldownA responsive package for Bot command cooldowns• With this package you can create the command cooldowns which will not get reset whenever the bot re-runJoinOfficial Discord Serverfor more guidance !FeaturesCooldowns of Bot commands are stored in aDATABASEAvailable DatabasesMySQL, PostgreSQL and Sqlite(Sqlite3)InstallationPython 3.8 or higher is required !# Linux/macOSpython3-mpipinstalldiscord-cooldown# Windows# Method-1:py-3-mpipinstalldiscord-cooldown# orpython-mpipinstalldiscord-cooldown# Method-2:pipinstalldiscord-cooldown# Using GIT for ALPHA or BETA Versions# Method-1:pipinstallgit+https://github.com/Modern-Realm/discord_cooldown# Method-2:pipinstall-Ugit+https://github.com/Modern-Realm/discord_cooldownNote:For better stability install package fromGitHubusingGITREQUIRED DEPENDENCIESYou can use ANY ONE of the below discord API Packagepy-cordnextcorddiscord.pyV2.0disnakeFor disnake you should Refactor/ Shim all discord terms to disnake terms to make Package workNote:Don't install more than oneDEPENDENCY !Other Dependenciesmysql-connector-pythonpsycopg2QuickStartfromdiscord_cooldown.modulesimportMySQLfromdiscord_cooldownimportCooldownimportdiscordfromdiscord.extimportcommandsfromdatetimeimporttimedeltaTOKEN=""intents=discord.Intents.all()client=commands.Bot(command_prefix="&",intents=intents)# MySQL Database Setupdb=MySQL(host="",db_name="",user="",passwd="")# For Indian timezone (UTC +5:30)timezone=+timedelta(hours=5,minutes=30)defCD():returnCooldown(database=db,timezone=timezone)@client.eventasyncdefon_ready():awaitclient.change_presence(status=discord.Status.online,activity=discord.Game("&help"))print("Bot is online")@client.eventasyncdefon_command_error(ctx,error):ifisinstance(error,commands.CommandOnCooldown):returnawaitctx.send(f"on cooldown retry after `{timedelta(seconds=error.retry_after)}`")else:# For resetting a command on any error other than CommandOnCooldownreturnawaitCD().reset_cooldown(ctx.author,ctx.command.name)@CD().cooldown(1,2*60)@client.command()asyncdeftest(ctx):awaitctx.send("testing")@CD().cooldown(2,0,reset_per_day=True)@client.command()asyncdefvote(ctx):awaitctx.send("done")@CD().cooldown(3,60)@client.command()asyncdeftest1(ctx,*,msg:str):awaitctx.send("message is "+msg)if__name__=="__main__":client.run(TOKEN)Project LinksYou can get support/help/guidance from below social-media linksHome PageOfficial Discord ServerPyPi Package
Package: discord-curious
curiousis a Python 3.6+ library to interact with theDiscordAPI.InstallationCurious is available on PyPI underdiscord-curious:$pipinstall-Udiscord-curiousOr for the latest development version:$pipinstall-Ugit+https://github.com/Fuyukai/curious.git#egg=curiousBasic ExamplefromcuriousimportBotType,Client,Messagecl=Client("token",bot_type=BotType.BOT|BotType.NO_DMS)@cl.event("ready")asyncdefready(ctx):print("Ready on shard",ctx.shard_id)@cl.event("message_create")asyncdefhandle_message(ctx,message:Message):print(f"{message.author.user.name}said '{message.content}'")cl.run(shards=1)DocumentationSee the documentation athttps://curious.readthedocs.io/en/latest/.
Package: discord-custom-help
discord-custom-helpMaking help commands easierInstallationpip install discord-custom-helpUsagebot.load_extension('dch')CustomizationTo change the color of embedsimportosos.environ['DCH_COLOR']='34ffcd'# Any hex color codeUsing disnake?importosos.environ["DISCORD_LIB"]="disnake"Join DiscordFor any kind of help
Package: discord.customs
discord.customsSome customized-extensions you can add to your discord.py bot.Installationpython3-mpipinstalldiscord.ext.customsExampleimportdiscordfromdiscord.ext.customsimportcommands# Enable gateway intents on the developer portalbot=commands.Bot(intents=discord.Intents.all())@bot.command(name="some_command")asyncdefsome_command(ctx):awaitctx.send(f"Hello.")bot.run("Token Here")NOTE: Some of these extensions already exist in the library, so i've added more functionality to them.