FuseFairy / DiscordBot-EdgeGPT

Using Copilot, Bing Image Creator and DALLE-3 on Discord bot.
GNU General Public License v2.0
160 stars 41 forks source link

Cookie Upload #111

Closed darnells68 closed 10 months ago

darnells68 commented 10 months ago

Good day, the bot works fine for me this is more of a question in the previous version of the bot a user could of upload a cookie and it could be used by everyone on the server using that single cookie. Now it only works on individual cookies per person. Is there a way I an allow my cookie to just be the default so anyone can use it, as it just a small server I have among friends.

FuseFairy commented 10 months ago

You can select only set instead of the cookie parameter, which will automatically use the default. image

darnells68 commented 10 months ago

when I set it, it only works with my cookies not for anyone else they are unable to use it with my cookies, is there specific line of code i have to change. Screenshot 2023-12-13 084734 also onto another issue I noticed lets say you type /bing and say hello, bing will give you some option as buttons to select Screenshot 2023-12-13 085026 if you click these button for example i clicked tell me a joke the bot will literally crash and refuse to work it will have to be restarted the previous version did not have this issue its something new. My console gave this error, this happens with any of the buttons.

Traceback (most recent call last): File "c:\Users\darne\Desktop\DiscordBot-EdgeGPT-1.0.0\DiscordBot-EdgeGPT-1.0.0\myenv\lib\site-packages\discord\ui\view.py", line 427, in _scheduled_task await item.callback(interaction) File "C:\Users\darne\Desktop\DiscordBot-EdgeGPT-1.0.0\DiscordBot-EdgeGPT-1.0.0\src\button_view.py", line 31, in callback await users_chatbot[user_id].send_message(interaction, usermessage) File "C:\Users\darne\Desktop\DiscordBot-EdgeGPT-1.0.0\DiscordBot-EdgeGPT-1.0.0\src\user_chatbot.py", line 53, in send_message await send_message(self.chatbot, interaction, message, self.conversation_style, users_chatbot, self.user_id) File "C:\Users\darne\Desktop\DiscordBot-EdgeGPT-1.0.0\DiscordBot-EdgeGPT-1.0.0\src\response.py", line 16, in send_message await interaction.response.defer(ephemeral=False, thinking=True) File "c:\Users\darne\Desktop\DiscordBot-EdgeGPT-1.0.0\DiscordBot-EdgeGPT-1.0.0\myenv\lib\site-packages\discord\interactions.py", line 616, in defer raise InteractionResponded(self._parent) discord.errors.InteractionResponded: This interaction has already been responded to before

FuseFairy commented 10 months ago

Please use the latest version image

darnells68 commented 10 months ago

okay the update fixed the second issue thanks, what I was asking for the first issue is that the current implementation of the bot allows the user to upload the cookie file and it will be allowed to use the bing chat bot. That works fine. However what I would like ideally if possible is to set my cookie as the default, using the set option on /chatbot settings so other users in the server would not have to upload there own unique cookie each time they would simply use mine. Is this possible for me to do if so what exactly could i change.

FuseFairy commented 10 months ago

user can use default cookies if there don't upload cookies https://github.com/FuseFairy/DiscordBot-EdgeGPT/issues/111#issuecomment-1853531634

darnells68 commented 10 months ago

okay I now understand what you meant, once the user has set a cookie file. The other user can use that cookie file however instead of uploading the file directly, they just need to go to chatbot setting, then click set and it will use the bot owner cookies. Two key take aways from this was 1) the bot will not be activated for everyone once the user sets the cookies the users must manually use the set option then press enter for the bot to work it does not assume to use the bot owners cookies by default. 2) if a user generates an image or chat and that chat or image has a button with it no other users can click that button other than the creator of the prompt one example I noticed with this is I asked my friend to test the image creator it generated the images and below the images was a regenerate button the button does not work for other users other than the creator of the prompt. If another user were to click the button this message would appear You don't have permission to press this button. Generally the issues I asked for have been solved thanks again for the assistance.