@@ -117,10 +117,11 @@ public void close(IReplyCallback callback, boolean withHelpers, @Nullable String
117117 .queue (s -> postThread .getManager ().setLocked (true ).setArchived (true ).queue ());
118118 if (callback .getMember ().getIdLong () != postThread .getOwnerIdLong () &&
119119 Boolean .parseBoolean (preferenceService .getOrCreate (postThread .getOwnerIdLong (), Preference .PRIVATE_CLOSE_NOTIFICATIONS ).getState ())) {
120-
121- postThread .getOwner ().getUser ().openPrivateChannel ()
122- .flatMap (c -> createDMCloseInfoEmbed (callback .getMember (), postThread , reason , c ))
123- .queue (success -> {}, failure -> {});
120+ postThread
121+ .getJDA ()
122+ .openPrivateChannelById (postThread .getOwnerIdLong ())
123+ .flatMap (c -> createDMCloseInfoEmbed (callback .getMember (), postThread , reason , c ))
124+ .queue (success -> {}, failure -> {});
124125
125126 botConfig .get (callback .getGuild ())
126127 .getModerationConfig ()
@@ -191,13 +192,15 @@ public void thankHelper(@NotNull Guild guild, ThreadChannel postThread, long hel
191192 service .performTransaction (helper .getIdLong (), config .getThankedExperience (), guild , postThread .getIdLong ());
192193 } catch (SQLException e ) {
193194 ExceptionLogger .capture (e , getClass ().getSimpleName ());
194- botConfig .get (guild ).getModerationConfig ().getLogChannel ().sendMessageFormat (
195- "Could not record user %s thanking %s for help in post %s: %s" ,
196- UserUtils .getUserTag (postThread .getOwner ().getUser ()),
197- UserUtils .getUserTag (helper ),
198- postThread .getAsMention (),
199- e .getMessage ()
200- ).queue ();
195+ guild .getJDA ().retrieveUserById (postThread .getOwnerIdLong ()).queue (owner -> {
196+ botConfig .get (guild ).getModerationConfig ().getLogChannel ().sendMessageFormat (
197+ "Could not record user %s thanking %s for help in post %s: %s" ,
198+ UserUtils .getUserTag (owner ),
199+ UserUtils .getUserTag (helper ),
200+ postThread .getAsMention (),
201+ e .getMessage ()
202+ ).queue ();
203+ });
201204 }
202205 });
203206 }
0 commit comments