lunarflu HF Staff commited on
Commit
0f184ab
·
1 Parent(s): 3266be8

Synced repo using 'sync_with_huggingface' Github Action

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -649,7 +649,13 @@ async def falcon(ctx, *, prompt: str):
649
  await ctx.message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
650
  #elif ctx.author.id in falcon_users: # deprecated
651
  elif ctx.author.id in falcon_userid_threadid_dictionary:
652
- await ctx.reply(f"{ctx.author.mention}, you already have an existing conversation! Use !falconclear in the #falcon channel to start a new one.")
 
 
 
 
 
 
653
  #------------------------------------
654
  # post all other generations here
655
  #if ctx.channel.id in falcon_threads: # deprecated
 
649
  await ctx.message.remove_reaction('<a:loading:1114111677990981692>', bot.user)
650
  #elif ctx.author.id in falcon_users: # deprecated
651
  elif ctx.author.id in falcon_userid_threadid_dictionary:
652
+ # get the threadid, grab the last message in that thread, link to that message
653
+ thread_id = falcon_userid_threadid_dictionary[ctx.author.id]
654
+ thread = await bot.fetch_channel(thread_id)
655
+ guild = bot.get_guild(879548962464493619)
656
+ channel = get(guild.channels, id=thread.id)
657
+ thread_link = f"https://discord.com/channels/{guild.id}/{channel.id}/{thread.id}"
658
+ await ctx.reply(f"{ctx.author.mention}, you already have an existing conversation here {thread_link}! Use !falconclear in the #falcon channel to start a new one.")
659
  #------------------------------------
660
  # post all other generations here
661
  #if ctx.channel.id in falcon_threads: # deprecated