Giter VIP home page Giter VIP logo

islambot's People

Contributors

chlohal avatar effective-light avatar fvviz avatar galacticwarrior9 avatar ibrh avatar itzmk21 avatar kamrulhasan12345 avatar marzooqishere avatar msabur avatar tabdiukov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

islambot's Issues

Error getting hadith from Forty Hadith of an-Nawawi

When I use the command -hadith nawawi 1, the bot says that the hadith can't be found. I looked into it a bit, and it seems that the API was giving a 404 response. A possible solution is using "forty" instead of "nawawi40" as the collection name when making the request. That solved the error for me.
https://api.sunnah.com/v1/collections/nawawi40/hadiths/1 returned 404
https://api.sunnah.com/v1/collections/forty/hadiths/1 gave the hadith

May Allah reward you for your amazing work

There are new translations at Quran.com

Esselamu aleykum we rahmetullahi we berekatuh brothers!
Today I have notices that Dutch -> M. F. Abdul Islam is added, could you add that also here?
Thank you in advance.
We aleykum esselam we rahmetullahi we berekatuh

Hadith problem

Reported on Discord.

-hadith bukhari 1457 and -hadith bukhari 1456 both return "Sorry, no hadith with this number could be found."

On the sunnah.com DB:

Reported on Discord

Translations offered by the Quran.com API have changed

The bot currently has about 114 translations if I remember correctly, whereas Quran.com API offer about 141 (iirc).
Some translations such as suhel aren't offered by the API anymore too.

The bot could either fetch the API translations list every time a user requests it which would be veryyy resourceful, or simply update it once in a while such as now.
Although hard coding the list once in a while isn't very elegant unfortunately.

Proposal to remove Grading score by Sahih al-Bukhari and Sahih Muslim for avoiding confusion

Esselamu alaikum wa rahmatullahi wa barakatuh brother,

Is it possible to remove "grade : Sahih" when we quote Hadith from Sahih al-Bukhari and Sahih Muslim?
Many brother think now that the hadith in these two books needs also be graded, and so they assume that there are many da'if ahadith also in it. (thus it needs a grade).

Since the original website (sunnah.com) has no grade for it, and they explained it here (https://sunnah.com/about) why they made the choice, it would be nice to coherent with them, in shaa Allah.

Thanks in advance!

Bug: /prayertimes get

/prayertimes get location: (any) would not work if a user /prayertimes set_calculation_method. This is possibly because the database prayer times handler returns the datatype that is the calculation_method column datatype in the table (which is possibly a string data type). This raises an exception because when setting the footer of the embed, the calculation_method is used as the key to the dict[int, str]

em.set_footer(text=f'Calculation Method: {self.calculation_methods[calculation_method]}')
     KeyError: '5'

'5' is an str while the keys in the calculation_methods dict are all int
That's if the table column wasn't already an INTEGER.

Display translations with their full name

Just like when searching for a Hadith book, it will say fully "Sahih ul Bukhari" instead of the abbreviation, similarly, Quran translations should do the same. For example right now it displays "sahih" but it should be displayed as "Sahih International".

A turkish translation request

Would love to read and send verses to discord channels from Edip Yuksel's translation... Can you add this translation too? God bless you.

Sunnah.com API token

I am making an Islamic bot for my server and I need access to the Sunnah.com API.

Set translation

It looks like the set translation command is not getting picked up by the bot. Had a few people try for me and none of us were able to use the syntax and get any result: -settranslation sahih

Arabic Hadith Formatting Bug

Some Arabic hadith, I think just the 40 Hadith of Nawawi, have a reference using the [] () syntax and it doesn't work properly because of the mix of the Arabic text and English URL. However, the English version works perfectly.
image

Redo command groups maybe

...since subcommands will eventually be nested under their parent command on the UI...

Possible proposal:
Redoing the command groups such as making it so /quran will be a group and there would be /quran translated, /quran arabic, /quran translated random, /quran arabic random, and possibly /quran morphology being subcommands.

Nice because:
-Neat, easy to find and discover through the UI
However:
-Messy such as with /quran translated random lol

Or a bit more leniently, /quran and /aquran being separate groups and having /quran (idk) and /quran random being subcommands.

Or /random being a group and having /random quran, /random mushaf, /random dua be subcommands.
Also having /set being a group and /set translation, /set default_tafsir etc if that #61 goes ahead.

Have buttons under Hadith, Quran, and Tafsir embeds to navigate to the next hadith/ayah in the book/Quran

Having buttons under a Hadith embed to navigate to the next hadith in the current collection or under a Quran embed to navigate to the next ayah in the current surah would be beneficial for the exact reason page navigation exists for the Mushaf command. Users will be able to simply read through the translation of the Quran (or Tafsir or Ahaadith in a collection) for the entire surah (or hadith collection) in one go without having to always type in the surah name then next ayah number (or hadith number) they desire.

Sometimes embeds require page navigators - these proposed navigators would be underneath them.

Would need to consider the limit of the number of ayahs in a surah or number of hadith in a collection. Also need to consider when a user does the Quran command with multiple ayahs in the embed - pressing "Next Ayah" or maybe "Next Ayahs" in that scenario would have to account for how many ayahs were in the original embed.

Bug: /biography name: عبد الله بن عباس

/biography name: عبد الله بن عباس gives this error:

Traceback (most recent call last):
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/venv/lib/python3.10/site-packages/discord/app_commands/commands.py", line 850, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/hadith/transmitter_biographies.py", line 52, in biography
    await self._biography(interaction, name)
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/hadith/transmitter_biographies.py", line 19, in _biography
    soup = await get_site_source(BIOGRAPHY_URL.format(name))
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/utils/utils.py", line 90, in get_site_source
    text = await resp.read()
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/venv/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1036, in read
    self._body = await self.content.read()
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/venv/lib/python3.10/site-packages/aiohttp/streams.py", line 375, in read
    block = await self.readany()
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/venv/lib/python3.10/site-packages/aiohttp/streams.py", line 397, in readany
    await self._wait("readany")
  File "/home/mk/Documents/Files/Projects/Discord Bots/IslamBot/venv/lib/python3.10/site-packages/aiohttp/streams.py", line 304, in _wait
    await waiter
aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed

The ClientPayloadError is raised from this line text = await resp.read().

I suspect this has to do with the actual website
/biography name: آدم بن سليمان مولى خالد بن خالد works perfectly though.

Conform to PEP8

Just standardises the formatting as well as not triggering any IDE.

Bot down?

Hi, is the bot stop working 15mn ago ?

Tafsir Saadi english

Is it possible to add the english version of Tafsir Al Saadi, I have a pdf where u can copy paste but will have to clean up the paste. I can try to help if you want.
[https://www.kalamullah.com/tafseer-as-sadi.html](Tafsir Al saadi pdfs)

Daily Ayah/Hadith

A function that will allow the user to use a command like -set and set the channel the message is in and time they sent the message to have the bot send an ayah/hadith there daily.

Localization

The bot is used on several servers where the primary language is neither English or Arabic.

The usage of user-contributed translations will increase the accessibility of the bot to more communities.

Random verse

Would love to have the ability to generate a random verse/ayah.

/mushaf, /tafsir, /morphology, /surah commands do not have the updated command descriptions for Arabic Surah names

With the efc0f48 / 2b8778c commits, the /quran command was updated with the description:

"The name or number of the surah to fetch, e.g. Al-Ikhlaas, 112 or إخلاص"

The /mushaf, /tafsir, /morphology, and /surah commands are still to be updated - these commands can still reference a Surah by the Arabic. Also, each description uses Surah Al-Ikhlaas as an example except for the /surah command that uses Surah Al-Baqarah as an example. Perhaps for consistency, having the /surah description also being Surah Al-Ikhlaas could be better.

Prayer time reminders rework

The current system floods the al-adhan API with thousands of requests a day. This is slow and will break if the API goes offline.

Some ideas:

  • We only use the al-adhan API once to get the longitude and latitude of the given location, ideally when the reminder is first set-up.
  • We then use these to compute the prayer times within the bot itself.
  • Get rid of the pandas dataframe that stores the entire reminders table in memory.

Muhammad Asad translation?

Can it be included in the list of English translations? I'm not sure how the translations are selected, and which ones are ok to include. If it is a matter of time and effort, I could perhaps help in some way?

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.